diff options
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b38565493e..1fea3836ec 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -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(); |