diff options
author | Hisham <hisham@gobolinux.org> | 2016-02-18 17:45:04 -0200 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-02-18 17:45:04 -0200 |
commit | 48254f92e4902ecd2b8ca27ae979b7d70e1ca804 (patch) | |
tree | 5e3afca9e38d043d8a9618e3e770e1300dbbedbe /Panel.c | |
parent | 5ee6715843902da1aa40782a9d00f41ca855a2ee (diff) |
Fix behavior of Panel on empty lists.
Closes #370.
Diffstat (limited to 'Panel.c')
-rw-r--r-- | Panel.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |