Fix crash in qt_try_modal.

Task-number: QTBUG-34580

Change-Id: Idc549116fa99aa49ac7c67dcfc76d32ca71f3c76
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
bb10
Friedemann Kleint 2014-04-08 11:49:14 +02:00 committed by The Qt Project
parent 449a0a2868
commit 61541404bc
1 changed files with 1 additions and 2 deletions

View File

@ -93,7 +93,6 @@ bool qt_try_modal(QWidget *widget, QEvent::Type type)
return true;
bool block_event = false;
bool paint_event = false;
switch (type) {
#if 0
@ -113,7 +112,7 @@ bool qt_try_modal(QWidget *widget, QEvent::Type type)
break;
}
if ((block_event || paint_event) && top->parentWidget() == 0)
if (block_event && top && top->parentWidget() == 0)
top->raise();
return !block_event;