[gnome-commander/gcmd-1-2-8] History: do not add empty strings



commit eeeb33f6537e63b3b5158e1b94a137f0ef2cd325
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jun 13 20:13:35 2011 +0200

    History: do not add empty strings

 src/history.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/history.cc b/src/history.cc
index 6908c9b..40c21da 100644
--- a/src/history.cc
+++ b/src/history.cc
@@ -42,6 +42,9 @@ void History::add(const gchar *text)
     if (is_locked)
         return;
 
+    if (!text || !*text)
+        return;
+
     // If we are in the middle of the history list, lets kill all items that are in front of us
     GList *l = ents;
     while (l && l != pos)



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