mirror of https://github.com/xzeldon/htop.git
Fix crash when emptying column. Closes #381.
This commit is contained in:
parent
011bf30d22
commit
0e3cf6975f
|
@ -50,7 +50,10 @@ static void MetersPanel_delete(Object* object) {
|
|||
void MetersPanel_setMoving(MetersPanel* this, bool moving) {
|
||||
Panel* super = (Panel*) this;
|
||||
this->moving = moving;
|
||||
((ListItem*)Panel_getSelected(super))->moving = moving;
|
||||
ListItem* selected = (ListItem*)Panel_getSelected(super);
|
||||
if (selected) {
|
||||
selected->moving = moving;
|
||||
}
|
||||
if (!moving) {
|
||||
Panel_setSelectionColor(super, CRT_colors[PANEL_SELECTION_FOCUS]);
|
||||
Panel_setDefaultBar(super);
|
||||
|
|
Loading…
Reference in New Issue