1
0
Fork 0

Fix message-box crash in non-Qt builds.

Only affects Linux where we have no fallback UI option.

https://sourceforge.net/p/flightgear/codetickets/1900/
This commit is contained in:
James Turner 2016-10-20 19:52:21 +01:00
parent ce79be323a
commit ad43d52070

View file

@ -134,13 +134,13 @@ MessageBoxResult modalMessageBox(const std::string& caption,
s += "\n( " + moreText + ")";
}
if (fgGetBool("/sim/rendering/initialized", false) == false) {
NewGUI* gui = globals->get_subsystem<NewGUI>();
if (!gui || (fgGetBool("/sim/rendering/initialized", false) == false)) {
SG_LOG(SG_GENERAL, SG_ALERT, s);
} else {
NewGUI* _gui = (NewGUI *)globals->get_subsystem("gui");
SGPropertyNode_ptr dlg = _gui->getDialogProperties("popup");
SGPropertyNode_ptr dlg = gui->getDialogProperties("popup");
dlg->setStringValue("text/label", s );
_gui->showDialog("popup");
gui->showDialog("popup");
}
return MSG_BOX_OK;
#endif