Calling BDiskDeviceSystem::CommitModifications() will delete all BPartition
children of the device and recreate them so that they are updated to any changes. MainWindow::_Initialize() was using a stale BPartition pointer after calling CommitModifications(). Now the pointer is recreated from the id. Should fix #2548. Untested. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26643 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -808,6 +808,11 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
||||
|
||||
// commit
|
||||
ret = modificationPreparer.CommitModifications();
|
||||
|
||||
// The partition pointer is toast now! Use the partition id to
|
||||
// retrieve it again.
|
||||
partition = disk->FindDescendant(selectedPartition);
|
||||
|
||||
if (ret == B_OK) {
|
||||
_DisplayPartitionError("The partition %s has been successfully "
|
||||
"initialized.\n", partition);
|
||||
|
||||
Reference in New Issue
Block a user