From 14c26d01afb881f0114ab85e8532cf1c8fadb070 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Aug 2021 12:30:44 +0200 Subject: [PATCH] [libcalamares] Warnings for nullptr Settings --- src/libcalamares/Settings.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcalamares/Settings.cpp b/src/libcalamares/Settings.cpp index 9453075b6..2620b8563 100644 --- a/src/libcalamares/Settings.cpp +++ b/src/libcalamares/Settings.cpp @@ -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 )