[gtk] font button: Fix a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] font button: Fix a crash
- Date: Mon, 2 Apr 2018 21:48:39 +0000 (UTC)
commit ec66c32deffda6104ee8f1efc4ccd8839d703d9f
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 2 17:45:48 2018 -0400
font button: Fix a crash
Since we are now storing the language as a PangoLanguage,
we must not free it anymore.
gtk/gtkfontbutton.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 6c06029bf8..21c244681e 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -1005,8 +1005,7 @@ response_cb (GtkDialog *dialog,
priv->font_size = gtk_font_chooser_get_font_size (font_chooser);
g_free (priv->font_features);
priv->font_features = gtk_font_chooser_get_font_features (font_chooser);
- g_free (priv->language);
- priv->language = gtk_font_chooser_get_language (font_chooser);
+ priv->language = pango_language_from_string (gtk_font_chooser_get_language (font_chooser));
/* Set label font */
gtk_font_button_update_font_info (font_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]