QWidget: Fix a crash when platform window creation fails
Add a check on the platform window to QWidgetPrivate::create_sys(). Task-number: QTBUG-65783 Change-Id: I077882e1cf22ef49bb6f578f7460493ef48c9627 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
99b89d30fa
commit
9de2ef6f5a
|
|
@ -1480,7 +1480,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
|||
if (q->windowType() != Qt::Desktop || q->testAttribute(Qt::WA_NativeWindow)) {
|
||||
win->create();
|
||||
// Enable nonclient-area events for QDockWidget and other NonClientArea-mouse event processing.
|
||||
win->handle()->setFrameStrutEventsEnabled(true);
|
||||
if (QPlatformWindow *platformWindow = win->handle())
|
||||
platformWindow->setFrameStrutEventsEnabled(true);
|
||||
}
|
||||
|
||||
data.window_flags = win->flags();
|
||||
|
|
|
|||
Loading…
Reference in New Issue