Fix null pointer exception on motd fetch failure (#1071)
This commit is contained in:
parent
fa94955d4f
commit
d333934f9b
@ -553,7 +553,10 @@ void Lobby::get_motd()
|
|||||||
{
|
{
|
||||||
document = tr("Couldn't get the message of the day.");
|
document = tr("Couldn't get the message of the day.");
|
||||||
}
|
}
|
||||||
ui_motd_text->setHtml(document);
|
if (ui_motd_text)
|
||||||
|
{
|
||||||
|
ui_motd_text->setHtml(document);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ private:
|
|||||||
QPushButton *ui_refresh_button;
|
QPushButton *ui_refresh_button;
|
||||||
|
|
||||||
// Serverinfo / MOTD Horizontal Row
|
// Serverinfo / MOTD Horizontal Row
|
||||||
QTextBrowser *ui_motd_text;
|
QPointer<QTextBrowser> ui_motd_text;
|
||||||
|
|
||||||
QLabel *ui_server_player_count_lbl;
|
QLabel *ui_server_player_count_lbl;
|
||||||
QTextBrowser *ui_server_description_text;
|
QTextBrowser *ui_server_description_text;
|
||||||
|
Loading…
Reference in New Issue
Block a user