Do not dereference nullptr.

This commit is contained in:
Teo Mrnjavac 2016-12-13 12:16:12 +01:00
parent c36b1f66a5
commit 457172df66

View File

@ -151,6 +151,12 @@ createNewEncryptedPartition( PartitionNode* parent,
FileSystemFactory::create( FileSystem::Luks,
firstSector,
lastSector ) );
if ( !fs )
{
qDebug() << "ERROR: cannot create LUKS filesystem. Giving up.";
return nullptr;
}
fs->createInnerFileSystem( fsType );
fs->setPassphrase( passphrase );
Partition* p = new Partition( parent,