about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-07-13 23:17:35 +0100
committerJames Booth <boothj5@gmail.com>2013-07-13 23:17:35 +0100
commit60cad8d29631443a5787b2052dd22716b284ee35 (patch)
tree969db1ee0d7854d792f6e2c71842fd527f88be01 /src/tools
parentbb550fed5547c7885e3f9c486051c742ac0b9b67 (diff)
parent1d05a7047314fa3c669358114dc6ce36bbc08386 (diff)
downloadprofani-tty-60cad8d29631443a5787b2052dd22716b284ee35.tar.gz
Merge branch 'master' into unicode
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/history.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/history.c b/src/tools/history.c
index 5ac41969..b80a9555 100644
--- a/src/tools/history.c
+++ b/src/tools/history.c
@@ -146,6 +146,10 @@ history_next(History history, char *item)
         return NULL;
     }
 
+    if (g_list_next(history->session.sess_curr) == NULL) {
+        return NULL;
+    }
+
     char *copied = "";
     if (item != NULL) {
         copied = strdup(item);