From 0bd511a33133366456af89fe027fde758b01d60c Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Tue, 24 Jan 2012 12:47:24 +1300 Subject: [PATCH] Avoid use after free in RowColumnManager.cpp Fixes CID 10862 --- src/libs/alm/RowColumnManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/alm/RowColumnManager.cpp b/src/libs/alm/RowColumnManager.cpp index 248950d1b0..269909691e 100644 --- a/src/libs/alm/RowColumnManager.cpp +++ b/src/libs/alm/RowColumnManager.cpp @@ -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); } }