[libpanel/gbsneto/no-autofree: 8/12] widget: Drop g_auto* usage




commit da629661cd45bf5f25f56cbd48dd64a44d42d90e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Sep 5 16:47:19 2022 -0300

    widget: Drop g_auto* usage

 src/panel-widget.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/panel-widget.c b/src/panel-widget.c
index a6f1e8a..b4d4ef0 100644
--- a/src/panel-widget.c
+++ b/src/panel-widget.c
@@ -200,9 +200,9 @@ panel_widget_save_cb (GObject      *object,
                       gpointer      user_data)
 {
   PanelSaveDelegate *save_delegate = (PanelSaveDelegate *)object;
-  g_autoptr(PanelWidget) self = user_data;
+  PanelWidget *self = user_data;
   PanelWidgetPrivate *priv = panel_widget_get_instance_private (self);
-  g_autoptr(GError) error = NULL;
+  GError *error = NULL;
 
   g_assert (PANEL_IS_SAVE_DELEGATE (save_delegate));
   g_assert (G_IS_ASYNC_RESULT (result));
@@ -216,9 +216,11 @@ panel_widget_save_cb (GObject      *object,
        *       display to the user via adwaita infobar replacement.
        */
       g_warning ("Failed to save: %s", error->message);
+      g_clear_error (&error);
     }
 
   panel_widget_update_actions (self);
+  g_clear_object (&self);
 }
 
 static void


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