Do not dereference nullptr.
This commit is contained in:
parent
07de427aab
commit
026fa922d2
@ -151,6 +151,12 @@ createNewEncryptedPartition( PartitionNode* parent,
|
|||||||
FileSystemFactory::create( FileSystem::Luks,
|
FileSystemFactory::create( FileSystem::Luks,
|
||||||
firstSector,
|
firstSector,
|
||||||
lastSector ) );
|
lastSector ) );
|
||||||
|
if ( !fs )
|
||||||
|
{
|
||||||
|
qDebug() << "ERROR: cannot create LUKS filesystem. Giving up.";
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
fs->createInnerFileSystem( fsType );
|
fs->createInnerFileSystem( fsType );
|
||||||
fs->setPassphrase( passphrase );
|
fs->setPassphrase( passphrase );
|
||||||
Partition* p = new Partition( parent,
|
Partition* p = new Partition( parent,
|
||||||
|
Loading…
Reference in New Issue
Block a user