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:
parent
ce79be323a
commit
ad43d52070
1 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue