[libcalamares] Don't crash when creating System object
- In tests, a System object might be created without first setting up a JobQueue. In that case, there's no instance, so no GS to insert into. Avoid crash here.
This commit is contained in:
parent
39d618c61e
commit
76ce0e4f2b
@ -85,8 +85,10 @@ System::System( bool doChroot, QObject* parent )
|
||||
{
|
||||
Q_ASSERT( !s_instance );
|
||||
s_instance = this;
|
||||
if ( !doChroot )
|
||||
if ( !doChroot && Calamares::JobQueue::instance() && Calamares::JobQueue::instance()->globalStorage() )
|
||||
{
|
||||
Calamares::JobQueue::instance()->globalStorage()->insert( "rootMountPoint", "/" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user