diff options
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index b8a31329fe..ab098b08bf 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -204,9 +204,9 @@ static QTouchDevice *touchDevice = 0; selector:@selector(windowNotification:) name:nil // Get all notifications object:newWindow]; - } else { - [[NSNotificationCenter defaultCenter] removeObserver:self name:nil object:[self window]]; } + if ([self window]) + [[NSNotificationCenter defaultCenter] removeObserver:self name:nil object:[self window]]; } - (void)updateGeometry { |