Avoid use after free in RowColumnManager.cpp

Fixes CID 10862
This commit is contained in:
Alex Wilson
2012-05-03 08:45:18 +12:00
parent 681f48fcbc
commit 0bd511a331
+2 -2
View File
@@ -69,7 +69,7 @@ RowColumnManager::RemoveArea(Area* area)
if (row->fAreas.CountItems() == 0) { if (row->fAreas.CountItems() == 0) {
fRows.RemoveItem(row); fRows.RemoveItem(row);
delete row; delete row;
} } else
_UpdateConstraints(row); _UpdateConstraints(row);
} }
@@ -80,7 +80,7 @@ RowColumnManager::RemoveArea(Area* area)
if (column->fAreas.CountItems() == 0) { if (column->fAreas.CountItems() == 0) {
fColumns.RemoveItem(column); fColumns.RemoveItem(column);
delete column; delete column;
} } else
_UpdateConstraints(column); _UpdateConstraints(column);
} }
} }