[vlc-devel] commit: macosx: avoid a crash if VLCIntf is NULL. (Pierre d'Herbemont )

git version control git at videolan.org
Wed Mar 26 17:36:13 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Mar 26 17:25:17 2008 +0100| [50d5d52137b5768fa13d44ecbc0911b6891ad3b8]

macosx: avoid a crash if VLCIntf is NULL.

Note: This is completly crippled and can easily lead to some race condition. We need to re-think the whole modules to avoid those.

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

 modules/gui/macosx/voutgl.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m
index 0ed822e..3179bbf 100644
--- a/modules/gui/macosx/voutgl.m
+++ b/modules/gui/macosx/voutgl.m
@@ -204,7 +204,7 @@ void E_(CloseVideoGL) ( vlc_object_t * p_this )
     {
         aglDestroyContext(p_vout->p_sys->agl_ctx);
     }
-    else if(!VLCIntf->b_die)
+    else if(VLCIntf && !VLCIntf->b_die)
     {
         NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
 




More information about the vlc-devel mailing list