From d63b9e14a09dbe941bc1f6606e3e296b62f938b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 17 Jul 2008 00:46:11 +0000 Subject: [PATCH] I think the ListPopulatorVisitor gets BDiskSystems allocated on the stack, so tracking the modification preparations is both unnecessary and as canceling is performed on a stale pointer... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26464 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/drivesetup/MainWindow.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp index afbb6f92d5..999ce46eb3 100644 --- a/src/apps/drivesetup/MainWindow.cpp +++ b/src/apps/drivesetup/MainWindow.cpp @@ -40,7 +40,6 @@ public: : fPartitionList(list) , fDiskCount(diskCount) , fSpaceIDMap(spaceIDMap) - , fLastPreparedDevice(NULL) { fDiskCount = 0; fSpaceIDMap.Clear(); @@ -52,11 +51,6 @@ public: delete row; } } - ~ListPopulatorVisitor() - { - if (fLastPreparedDevice) - fLastPreparedDevice->CancelModifications(); - } virtual bool Visit(BDiskDevice* device) { @@ -64,12 +58,7 @@ public: // if we don't prepare the device for modifications, // we cannot get information about available empty // regions on the device or child partitions - if (fLastPreparedDevice) { - fLastPreparedDevice->CancelModifications(); - fLastPreparedDevice = NULL; - } - if (device->PrepareModifications() == B_OK) - fLastPreparedDevice = device; + device->PrepareModifications(); _AddPartition(device); return false; // Don't stop yet! }