summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index bc5062e942..74f2dc0c41 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1482,7 +1482,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();