Avoid use after free in RowColumnManager.cpp

Fixes CID 10862
This commit is contained in:
Alex Wilson 2012-01-24 12:47:24 +13:00
parent 681f48fcbc
commit 0bd511a331

View File

@ -69,8 +69,8 @@ RowColumnManager::RemoveArea(Area* area)
if (row->fAreas.CountItems() == 0) {
fRows.RemoveItem(row);
delete row;
}
_UpdateConstraints(row);
} else
_UpdateConstraints(row);
}
Column* column = area->fColumn;
@ -80,8 +80,8 @@ RowColumnManager::RemoveArea(Area* area)
if (column->fAreas.CountItems() == 0) {
fColumns.RemoveItem(column);
delete column;
}
_UpdateConstraints(column);
} else
_UpdateConstraints(column);
}
}