summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index f68d34ff9d..e42fbad00e 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -171,7 +171,10 @@ static QTouchDevice *touchDevice = 0;
- (void)dealloc
{
CGImageRelease(m_maskImage);
- [m_trackingArea release];
+ if (m_trackingArea) {
+ [self removeTrackingArea:m_trackingArea];
+ [m_trackingArea release];
+ }
m_maskImage = 0;
[m_inputSource release];
[[NSNotificationCenter defaultCenter] removeObserver:self];