diff --git a/src/modules/users/MiscJobs.cpp b/src/modules/users/MiscJobs.cpp index 4f2570a0a..a62ada6d7 100644 --- a/src/modules/users/MiscJobs.cpp +++ b/src/modules/users/MiscJobs.cpp @@ -66,6 +66,10 @@ STATICTEST QStringList groupsInTargetSystem() { Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + if ( !gs ) + { + return QStringList(); + } QDir targetRoot( gs->value( "rootMountPoint" ).toString() ); QFileInfo groupsFi( targetRoot.absoluteFilePath( "etc/group" ) ); diff --git a/src/modules/users/TestGroupInformation.cpp b/src/modules/users/TestGroupInformation.cpp index 3a04409d5..6f650049a 100644 --- a/src/modules/users/TestGroupInformation.cpp +++ b/src/modules/users/TestGroupInformation.cpp @@ -9,6 +9,7 @@ #include "CreateUserJob.h" +#include "JobQueue.h" #include "utils/Logger.h" #include @@ -37,6 +38,10 @@ GroupTests::initTestCase() { Logger::setupLogLevel( Logger::LOGDEBUG ); cDebug() << "Users test started."; + if ( !Calamares::JobQueue::instance() ) + { + (void)new Calamares::JobQueue(); + } } void