[gnome-text-editor] preferencesdialog: allow use without Pango autoptr



commit 7b6c0170a7d6c3934598a802b65756cf338cb27d
Author: Christian Hergert <christian hergert me>
Date:   Thu Dec 9 12:02:11 2021 -0800

    preferencesdialog: allow use without Pango autoptr

 src/editor-preferences-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-preferences-dialog.c b/src/editor-preferences-dialog.c
index 74bffda..55c4f3a 100644
--- a/src/editor-preferences-dialog.c
+++ b/src/editor-preferences-dialog.c
@@ -241,9 +241,11 @@ update_custom_font_cb (EditorPreferencesDialog *self,
   if (!g_settings_get_boolean (settings, "use-system-font"))
     {
       g_autofree char *custom_font = g_settings_get_string (settings, "custom-font");
-      g_autoptr(PangoFontDescription) font_desc = pango_font_description_from_string (custom_font);
+      PangoFontDescription *font_desc = pango_font_description_from_string (custom_font);
       g_autofree char *css = _editor_font_description_to_css (font_desc);
 
+      g_clear_pointer (&font_desc, pango_font_description_free);
+
       if (css != NULL)
         {
           g_autoptr(GString) str = g_string_new (NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]