Commit 4ee7bfaf authored by Timur Pocheptsov's avatar Timur Pocheptsov Committed by Jani Heikkinen
Browse files

QNSImageView - remove observer before dealloc


It can happen that NSMenuDidEndTrackingNotification comes after our imageCell
QNSImageView was deallocated (for example, mouse button is not released yet
when dealloc called). Remove soon-to-be-deallocated observer.

Change-Id: Ib155cc5f0b884c6b1fed0f986d12599096b582c6
Task-number: QTBUG-46425
Reviewed-by: default avatarThierry Bastian <thierryb@filewave.com>
Reviewed-by: default avatarGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Showing with 1 addition and 0 deletions
......@@ -446,6 +446,7 @@ QT_END_NAMESPACE
-(void)dealloc {
[[NSStatusBar systemStatusBar] removeStatusItem:item];
[[NSNotificationCenter defaultCenter] removeObserver:imageCell];
[imageCell release];
[item release];
[super dealloc];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment