Prevent crash in tst_QWidget::persistentWinId().
Only call createWinId() if we have a parent widget set.bb10
parent
504ab89c6a
commit
7d9fcaccb1
|
|
@ -234,7 +234,7 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
|
|||
if (!(f&Qt::Window) && (oldFlags&Qt::Window) && !q->testAttribute(Qt::WA_NativeWindow)) {
|
||||
//qDebug() << "setParent_sys() change from toplevel";
|
||||
q->destroy();
|
||||
} else if (wasCreated) {
|
||||
} else if (newparent && wasCreated) {
|
||||
q->createWinId();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue