summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-11-28 14:47:46 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-11-28 14:47:46 (GMT)
commite21409c95470edcea268caa9d627820ccb46a923 (patch)
treecc4aa7d03338160c42ce95e2511c0de9119ff655
parentdc380979aedfa3a37ce184578fa9e9312909970a (diff)
downloadeeshow-e21409c95470edcea268caa9d627820ccb46a923.zip
eeshow-e21409c95470edcea268caa9d627820ccb46a923.tar.gz
eeshow-e21409c95470edcea268caa9d627820ccb46a923.tar.bz2
gui/sheet.c (sheet_key): check if we have history before calling show_history
Reported by "ceene".
-rw-r--r--gui/sheet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index 138610d..f89b4db 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -597,11 +597,13 @@ static void sheet_key(void *user, int x, int y, int keyval)
break;
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
- show_history(gui, sel_new);
+ if (have_history(gui))
+ show_history(gui, sel_new);
break;
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
- show_history(gui, sel_old);
+ if (have_history(gui))
+ show_history(gui, sel_old);
break;
case GDK_KEY_Tab:
case GDK_KEY_KP_Tab: