[users] Protect against a nullptr deref

- there is typically no GS during tests
main
Adriaan de Groot 5 years ago
parent 4b4d7f3b10
commit ab3e393d45

@ -83,7 +83,11 @@ Config::setUserShell( const QString& shell )
return;
}
// The shell is put into GS because the CreateUser job expects it there
Calamares::JobQueue::instance()->globalStorage()->insert( "userShell", shell );
auto* gs = Calamares::JobQueue::instance()->globalStorage();
if ( gs )
{
gs->insert( "userShell", shell );
}
}
static inline void

Loading…
Cancel
Save