Commit 34431dc7 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Merge branch 'master' of https://github.com/hishamhm/htop

parents 42c44593 48254f92
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment