diff --git a/src/lobby.cpp b/src/lobby.cpp index 5e98b75..d4a58e9 100644 --- a/src/lobby.cpp +++ b/src/lobby.cpp @@ -553,7 +553,10 @@ void Lobby::get_motd() { document = tr("Couldn't get the message of the day."); } - ui_motd_text->setHtml(document); + if (ui_motd_text) + { + ui_motd_text->setHtml(document); + } }); } diff --git a/src/lobby.h b/src/lobby.h index 8b894f4..0221b5f 100644 --- a/src/lobby.h +++ b/src/lobby.h @@ -82,7 +82,7 @@ private: QPushButton *ui_refresh_button; // Serverinfo / MOTD Horizontal Row - QTextBrowser *ui_motd_text; + QPointer ui_motd_text; QLabel *ui_server_player_count_lbl; QTextBrowser *ui_server_description_text;