[libcalamares] Warnings for nullptr Settings

This commit is contained in:
Adriaan de Groot 2021-08-24 12:30:44 +02:00
parent e9a98f35ad
commit 14c26d01af

View File

@ -104,6 +104,10 @@ Settings* Settings::s_instance = nullptr;
Settings*
Settings::instance()
{
if ( !s_instance )
{
cWarning() << "Getting nullptr Settings instance.";
}
return s_instance;
}
@ -238,6 +242,9 @@ Settings::Settings( bool debugMode )
, m_disableCancel( false )
, m_disableCancelDuringExec( false )
{
cWarning() << "Using bogus Calamares settings in"
<< ( debugMode ? QStringLiteral( "debug" ) : QStringLiteral( "regular" ) ) << "mode";
s_instance = this;
}
Settings::Settings( const QString& settingsFilePath, bool debugMode )