File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -459,19 +459,22 @@ static void
459459font_button_font_set_cb (GtkWidget * font_button ,
460460 GdictPrefDialog * dialog )
461461{
462- const char * font ;
462+ gchar * font ;
463463
464464 font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (font_button ));
465- if (!font || font [0 ] == '\0' )
466- return ;
467465
468- if (g_strcmp0 (dialog -> print_font , font ) == 0 )
469- return ;
470-
466+ if (!font || font [0 ] == '\0' || g_strcmp0 (dialog -> print_font , font ) == 0 )
467+ {
468+ g_free (font );
469+ return ;
470+ }
471+
471472 g_free (dialog -> print_font );
472473 dialog -> print_font = g_strdup (font );
473474
474475 g_settings_set_string (dialog -> settings , GDICT_SETTINGS_PRINT_FONT_KEY , dialog -> print_font );
476+
477+ g_free (font );
475478}
476479
477480static void
You can’t perform that action at this time.
0 commit comments