[gnome-panel] panel: avoid a critical



commit 73fa9808f24ee6a95e12a8558d6b1f6513b78693
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Feb 4 23:01:26 2018 +0200

    panel: avoid a critical
    
    g_file_query_info can return NULL. Use g_clear_object to make
    sure we don't try to unref NULL pointer.

 gnome-panel/panel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index e73911a..abe98cb 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -697,7 +697,7 @@ drop_urilist (PanelWidget         *panel,
                                success = FALSE;
                }
 
-               g_object_unref (info);
+               g_clear_object (&info);
                g_object_unref (file);
        }
 


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