[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:29:59 CEST 2010


vlc | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Mon Jun  7 22:34:31 2010 +0200| [5995ceeb4cd344894f24bfd9402e18972fd5adca] | 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>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5995ceeb4cd344894f24bfd9402e18972fd5adca
---

 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