summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 16f5bd6..ddf1a27 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -234,8 +234,10 @@ QT_END_NAMESPACE
// This method is called the first time the window is placed on screen and
// is the earliest point in time we can connect OpenGL contexts to NSViews.
QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
- qt_event_request_window_change(qwidget);
- qt_mac_send_posted_gl_updates(qwidget);
+ if (qwidget) {
+ qt_event_request_window_change(qwidget);
+ qt_mac_send_posted_gl_updates(qwidget);
+ }
[super setInitialFirstResponder:view];
}