[vlc-commits] commit: Remove observer from the notification center in the dealloc method to prevent a crash when notification center posts NSApplicationWillTerminateNotification and the VLAboutBox has already been released . (Sebastien Zwickert )
git at videolan.org
git at videolan.org
Wed Jun 16 18:34:58 CEST 2010
vlc/vlc-1.1 | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Mon Jun 7 22:34:31 2010 +0200| [4deadc4c8a068f3feadc597bc8def1d794bde6df] | committer: Jean-Baptiste Kempf
Remove observer from the notification center in the dealloc method to prevent a crash when notification center posts NSApplicationWillTerminateNotification and the VLAboutBox has already been released.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 5995ceeb4cd344894f24bfd9402e18972fd5adca)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=4deadc4c8a068f3feadc597bc8def1d794bde6df
---
modules/gui/macosx/about.m | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/gui/macosx/about.m b/modules/gui/macosx/about.m
index 03bbc04..d56ed7f 100644
--- a/modules/gui/macosx/about.m
+++ b/modules/gui/macosx/about.m
@@ -61,6 +61,12 @@ static VLAboutBox *_o_sharedInstance = nil;
return _o_sharedInstance;
}
+- (void) dealloc
+{
+ [[NSNotificationCenter defaultCenter] removeObserver: self];
+ [super dealloc];
+}
+
/*****************************************************************************
* VLC About Window
*****************************************************************************/
More information about the vlc-commits
mailing list