We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d541d6e commit 2f8d89dCopy full SHA for 2f8d89d
1 file changed
mate-dictionary/src/gdict-pref-dialog.c
@@ -459,19 +459,22 @@ static void
459
font_button_font_set_cb (GtkWidget *font_button,
460
GdictPrefDialog *dialog)
461
{
462
- const char *font;
+ gchar *font;
463
464
font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (font_button));
465
- if (!font || font[0] == '\0')
466
- return;
467
468
- if (g_strcmp0 (dialog->print_font, font) == 0)
469
470
-
+ if (!font || font[0] == '\0' || g_strcmp0 (dialog->print_font, font) == 0)
+ {
+ g_free (font);
+ return;
+ }
471
+
472
g_free (dialog->print_font);
473
dialog->print_font = g_strdup (font);
474
475
g_settings_set_string (dialog->settings, GDICT_SETTINGS_PRINT_FONT_KEY, dialog->print_font);
476
477
478
}
479
480
static void
0 commit comments