[gnome-commander] Check argument to be NULL



commit 74d8c26d0ebefc37f551e1a6ccd421c67316d264
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Jun 4 15:44:09 2017 +0200

    Check argument to be NULL

 src/gnome-cmd-data.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index f27932d..1fef2ee 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -2470,7 +2470,7 @@ inline void GnomeCmdData::gnome_cmd_data_set_string_history (const gchar *format
 gboolean GnomeCmdData::set_gsettings_string_array_from_glist (GSettings *settings_given, const gchar *key, 
GList *strings)
 {
     gboolean rv = true;
-    guint number_of_strings = g_list_length (strings);
+    guint number_of_strings = strings == NULL ? 0 : g_list_length (strings);
     if (number_of_strings > 0)
     {
         gint ii;


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