[gnome-control-center] printers: Don't leak a couple of dialogs



commit b17bd4ea7e1c119d67ae63967a973029fed61887
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Sep 17 17:04:16 2013 +0200

    printers: Don't leak a couple of dialogs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708286

 panels/printers/pp-authentication-dialog.c |    2 +-
 panels/printers/pp-new-printer-dialog.c    |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/pp-authentication-dialog.c b/panels/printers/pp-authentication-dialog.c
index fd1c300..d089cee 100644
--- a/panels/printers/pp-authentication-dialog.c
+++ b/panels/printers/pp-authentication-dialog.c
@@ -289,7 +289,7 @@ pp_authentication_dialog_finalize (GObject *object)
   PpAuthenticationDialog        *dialog = PP_AUTHENTICATION_DIALOG (object);
   PpAuthenticationDialogPrivate *priv = dialog->priv;
 
-  gtk_widget_hide (priv->dialog);
+  g_clear_pointer (&priv->dialog, gtk_widget_destroy);
 
   g_object_unref (priv->builder);
   g_free (priv->text);
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 5c420ea..8a432f7 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -505,6 +505,8 @@ pp_new_printer_dialog_finalize (GObject *object)
       g_clear_object (&priv->cancellable);
     }
 
+  g_clear_pointer (&priv->dialog, gtk_widget_destroy);
+
   if (priv->builder)
     g_clear_object (&priv->builder);
 


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