[gnome-control-center] shell: Fix possible warning on startup



commit 9e6ed56939b30591ecd93ea1720fb134fc90bbec
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 21 18:51:18 2012 +0100

    shell: Fix possible warning on startup
    
    When started with a specific panel listed.

 shell/cc-shell.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/shell/cc-shell.c b/shell/cc-shell.c
index 9264e68..eb97a3a 100644
--- a/shell/cc-shell.c
+++ b/shell/cc-shell.c
@@ -158,8 +158,7 @@ cc_shell_set_active_panel (CcShell *shell,
   if (panel != shell->priv->active_panel)
     {
       /* remove the old panel */
-      g_object_unref (shell->priv->active_panel);
-      shell->priv->active_panel = NULL;
+      g_clear_object (&shell->priv->active_panel);
 
       /* set the new panel */
       if (panel)



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