[gnome-panel] panel-run-dialog.c: Avoid a critical message for programs without an icon.



commit d745f799f6108534663b3d9de2a0c40156e1ed7b
Author: Sebastian Geiger <sbastig gmx net>
Date:   Thu Jun 4 14:57:04 2015 +0200

    panel-run-dialog.c: Avoid a critical message for programs without an icon.
    
    If a program has no icon then we tried to unref a null pointer. We avoid this
    by using g_object_clear instead.

 gnome-panel/panel-run-dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index bb7eacc..97584b3 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -812,7 +812,7 @@ panel_run_dialog_find_command_idle (PanelRunDialog *dialog)
                }
 
                g_free (exec);
-               g_object_unref (icon);
+               g_clear_object (&icon);
                g_free (name);
                g_free (comment);
        


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