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
parent
449a0a2868
commit
61541404bc
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue