mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix potential crash when attempting to free default font
Before setting a new font we try to free the existing font. Sadly if no config value is set for the default font, we assign a string literal. Which of course means that subsurface dumps core when trying to free it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b4c11a7ed3
commit
1a6cf2f128
3 changed files with 3 additions and 3 deletions
2
linux.c
2
linux.c
|
@ -88,7 +88,7 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
|
|||
GtkWidget *vbox, GtkUIManager *ui_manager)
|
||||
{
|
||||
if (!divelist_font)
|
||||
divelist_font = DIVELIST_DEFAULT_FONT;
|
||||
divelist_font = strdup(DIVELIST_DEFAULT_FONT);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue