CLI/testsuite: do not crash if a dialog is displayed.
parent
22e4011cb6
commit
43b2261e9c
12
src/util.cpp
12
src/util.cpp
|
@ -143,7 +143,17 @@ static void MessageBox(const char *fmt, va_list va, bool error,
|
|||
description = description.substr(it - description.begin());
|
||||
|
||||
Platform::MessageDialogRef dialog = CreateMessageDialog(SS.GW.window);
|
||||
|
||||
if (!dialog) {
|
||||
if (error) {
|
||||
fprintf(stderr, "Error: %s\n", message.c_str());
|
||||
} else {
|
||||
fprintf(stderr, "Message: %s\n", message.c_str());
|
||||
}
|
||||
if(onDismiss) {
|
||||
onDismiss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
using Platform::MessageDialog;
|
||||
if(error) {
|
||||
dialog->SetType(MessageDialog::Type::ERROR);
|
||||
|
|
Loading…
Reference in New Issue