From 8c82a38002ce09db2a0b83dab8b598cf1ab0596c Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:01:17 +0200 Subject: Imported Upstream version 2.0.1 --- Panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Panel.c') diff --git a/Panel.c b/Panel.c index dd94cea..1c45714 100644 --- a/Panel.c +++ b/Panel.c @@ -441,7 +441,7 @@ bool Panel_onKey(Panel* this, int key) { } // ensure selection within bounds - if (this->selected < 0) { + if (this->selected < 0 || size == 0) { this->selected = 0; this->needsRedraw = true; } else if (this->selected >= size) { -- cgit v1.2.3