[vlc-commits] macosx: Unset p_interface_thread outside of the autoreleasepool

David Fuhrmann git at videolan.org
Thu May 23 21:04:58 CEST 2019


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu May 23 20:58:19 2019 +0200| [fdbf7317e0234a837fd7302f3b405f727c0635b7] | committer: David Fuhrmann

macosx: Unset p_interface_thread outside of the autoreleasepool

In theory, some objects are only released during drain of the
autorelease pool (i.e. at the place of the closing bracket of
the @autorelease block).

Some of those objects might need getInf() in their dealloc code,
so this pointer should stay available at this stage.

Should fix crash id 8f0bb1b4-fa5a-4d92-bcb3-9f6c0130fc86.

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

 modules/gui/macosx/main/VLCMain.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/main/VLCMain.m b/modules/gui/macosx/main/VLCMain.m
index c0c9326fe6..3aa0808a86 100644
--- a/modules/gui/macosx/main/VLCMain.m
+++ b/modules/gui/macosx/main/VLCMain.m
@@ -169,9 +169,9 @@ void CloseIntf (vlc_object_t *p_this)
         msg_Dbg(p_this, "Closing macosx interface");
         [[VLCMain sharedInstance] applicationWillTerminate:nil];
         [VLCMain killInstance];
-
-        p_interface_thread = nil;
     }
+
+    p_interface_thread = nil;
 }
 
 #pragma mark -



More information about the vlc-commits mailing list