aboutsummaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
commitadefe52ce2ad43c442c0b40bfe637e238e454246 (patch)
tree1be4d43e90ea340992e3068c1348196a6e4b145c /Panel.c
parent0063095c92e95190a0376ad245509345e5b690ed (diff)
parent8c82a38002ce09db2a0b83dab8b598cf1ab0596c (diff)
downloaddebian_htop-adefe52ce2ad43c442c0b40bfe637e238e454246.tar.gz
debian_htop-adefe52ce2ad43c442c0b40bfe637e238e454246.tar.bz2
debian_htop-adefe52ce2ad43c442c0b40bfe637e238e454246.zip
Merge tag 'upstream/2.0.1'
Upstream version 2.0.1
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c2
1 files changed, 1 insertions, 1 deletions
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) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy