When merging NewOperation and CreateFileSystemOperation, don't delete the old
FS before trying to clone it. BUG: 171971 svn path=/trunk/playground/sysadmin/partitionmanager/; revision=866672
This commit is contained in:
parent
d8791eb862
commit
2084e004c4
|
@ -167,8 +167,12 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
|
||||||
{
|
{
|
||||||
log() << i18nc("@info/plain", "Changing file system for a new partition: No new operation required.");
|
log() << i18nc("@info/plain", "Changing file system for a new partition: No new operation required.");
|
||||||
|
|
||||||
newOp->newPartition().deleteFileSystem();
|
FileSystem* oldFs = &newOp->newPartition().fileSystem();
|
||||||
newOp->newPartition().setFileSystem(FileSystemFactory::cloneWithNewType(pushedCreateFileSystemOp->newFileSystem()->type(), newOp->newPartition().fileSystem()));
|
|
||||||
|
newOp->newPartition().setFileSystem(FileSystemFactory::cloneWithNewType(pushedCreateFileSystemOp->newFileSystem()->type(), *oldFs));
|
||||||
|
|
||||||
|
delete oldFs;
|
||||||
|
oldFs = NULL;
|
||||||
|
|
||||||
delete pushedOp;
|
delete pushedOp;
|
||||||
pushedOp = NULL;
|
pushedOp = NULL;
|
||||||
|
|
Loading…
Reference in New Issue