diff options
Diffstat (limited to 'src/scenes/add_server_wizard')
-rw-r--r-- | src/scenes/add_server_wizard/add_server_wizard.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/scenes/add_server_wizard/add_server_wizard.cpp b/src/scenes/add_server_wizard/add_server_wizard.cpp index e398b19..9b67ebc 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.cpp +++ b/src/scenes/add_server_wizard/add_server_wizard.cpp @@ -67,6 +67,15 @@ void Add_Server_wizard::add_server(QString host_url, QString host_alias) { } void Add_Server_wizard::add_web_app_host_response(QJsonDocument *doc) { + // Q_ASSERT lets the program crash immediatly at startup, + // when the session service is not started. + // Don't use Q_ASSERT(doc != nullptr); instead use: + if (doc == nullptr) { + _main_gui->setRWAHostSelected(false); + _main_gui->showToast(tr("Can't connect to underlying session service!"), 9800); + return; + } + // Get the QJsonObject QJsonObject jObject = doc->object(); QVariantMap mainMap = jObject.toVariantMap(); |