Fix crash when emptying column. Closes #381.

This commit is contained in:
Hisham 2016-02-12 23:33:53 -02:00
parent 011bf30d22
commit 0e3cf6975f
1 changed files with 4 additions and 1 deletions

View File

@ -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);