Avoid crash at GUI start up
The crash can happen before mainWindow is allocated. Don't remember how that happens, but I have seen it happen!
This commit is contained in:
parent
7dd070fd98
commit
041f500e65
@ -182,6 +182,8 @@ void LogsWindow::alert(State state)
|
||||
// start - center of main window
|
||||
QRect start;
|
||||
QWidget *view = mainWindow;
|
||||
if (!view)
|
||||
return;
|
||||
alert_->setParent(view);
|
||||
alert_->raise();
|
||||
start.setSize(QSize(256, 256).scaled(view->size()/2, Qt::KeepAspectRatio));
|
||||
|
Loading…
Reference in New Issue
Block a user