[gnome-commander] History: do not add empty strings
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] History: do not add empty strings
- Date: Mon, 13 Jun 2011 19:20:33 +0000 (UTC)
commit 04c07d4a01e13ff1037fb6998df670a58645de35
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 2d2d5b1..a5b7eb4 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]