Fix showing error dialog when calling vsimple_error_message_box()

SimpleDialog requires a parent, when none is provided (as there is no parent available during startup), the error message is queued and displayed after MainWindow is available.
Calling SimpleDialog::exec() directly returns if no parent is set (hence the dialog is not shown)

This resulted in silently ignoring error messages that were shown using vsimple_error_message_box(), as this function did not provide a parent (and the queue messages were not dequeued anymore as the MainWindow was already available)

Change-Id: I2f4c1b4926c196ab40b035161cec530105396537
Reviewed-on: https://code.wireshark.org/review/5519
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Maarten Bezemer 2014-11-27 15:09:52 +01:00 committed by Michael Mann
parent e172ebb3b4
commit f16376ed7b
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ simple_message_box(ESD_TYPE_E type, gboolean *notagain,
void
vsimple_error_message_box(const char *msg_format, va_list ap)
{
SimpleDialog sd(NULL, ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap);
SimpleDialog sd(gbl_cur_main_window_, ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap);
sd.exec();
}