Do not dereference a nullptr.
This commit is contained in:
parent
d96cfb725b
commit
845dd761d9
@ -172,6 +172,8 @@ void
|
|||||||
PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::TableType type )
|
PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::TableType type )
|
||||||
{
|
{
|
||||||
DeviceInfo* info = infoForDevice( device );
|
DeviceInfo* info = infoForDevice( device );
|
||||||
|
if ( info )
|
||||||
|
{
|
||||||
// Creating a partition table wipes all the disk, so there is no need to
|
// Creating a partition table wipes all the disk, so there is no need to
|
||||||
// keep previous changes
|
// keep previous changes
|
||||||
info->forgetChanges();
|
info->forgetChanges();
|
||||||
@ -180,6 +182,7 @@ PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::Table
|
|||||||
CreatePartitionTableJob* job = new CreatePartitionTableJob( device, type );
|
CreatePartitionTableJob* job = new CreatePartitionTableJob( device, type );
|
||||||
job->updatePreview();
|
job->updatePreview();
|
||||||
info->jobs << Calamares::job_ptr( job );
|
info->jobs << Calamares::job_ptr( job );
|
||||||
|
}
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user