[gnome-commander] Don't try to store open tabs if "fileListTabs" is empty



commit f6086b038792a0ab5b34efb97094af5b44b6776c
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Thu Jul 22 22:20:51 2021 +0200

    Don't try to store open tabs if "fileListTabs" is empty

 src/gnome-cmd-data.cc | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 2a502d62..efca8d32 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1812,6 +1812,12 @@ static void save_tabs(GSettings *gSettings, const char *gSettingsKey)
         g_list_free (tabs);
     }
     fileListTabs = g_variant_builder_end (&gVariantBuilder);
+
+    if (!fileListTabs)
+    {
+        return;
+    }
+
     g_settings_set_value(gSettings, gSettingsKey, fileListTabs);
 }
 


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