[gnome-software] trivial: Add a NULL check to gs_plugin_list_randomize()



commit 0eda8c6f1297b69f8adbe252c7b496d6c2feca70
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Jun 15 09:52:44 2015 +0200

    trivial: Add a NULL check to gs_plugin_list_randomize()

 src/gs-plugin.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index 5155401..0f7a17b 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -161,6 +161,8 @@ gs_plugin_list_randomize (GList **list)
        _cleanup_date_time_unref_ GDateTime *date = NULL;
        _cleanup_free_ gchar *key = NULL;
 
+       g_return_if_fail (list != NULL);
+
        key = g_strdup_printf ("Plugin::sort-key[%p]", list);
        rand = g_rand_new ();
        date = g_date_time_new_now_utc ();


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