]> git.sesse.net Git - vlc/commitdiff
Don't crash when using libgmalloc on Leopard (closes #1501)
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 26 Mar 2008 11:25:40 +0000 (12:25 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 26 Mar 2008 11:25:40 +0000 (12:25 +0100)
Patch by Drew Yao. Thanks and sorry for the long time it took this simple fix to be committed!

modules/gui/macosx/intf.m

index 9fdfed39d20ca00214e1c6f7042fad973ee1b9ab..7a98a5c2399a7349399374f1e0b69a42417e2b95 100644 (file)
@@ -409,11 +409,13 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (id)init
 {
-    if( _o_sharedMainInstance) {
+    if( _o_sharedMainInstance) 
+    {
         [self dealloc];
-    } else {
+        return _o_sharedMainInstance;
+    } 
+    else
         _o_sharedMainInstance = [super init];
-    }
 
     o_about = [[VLAboutBox alloc] init];
     o_prefs = [[VLCPrefs alloc] init];