[vlc-commits] mac: fix runtime exception on termination

Felix Paul Kühne git at videolan.org
Mon Apr 28 15:52:08 CEST 2014


npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr 28 15:52:01 2014 +0200| [b65551b339f8c6c3ac57967af51ed23910f73d23] | committer: Felix Paul Kühne

mac: fix runtime exception on termination

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

 npapi/vlcplugin_mac.mm |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
index 6f5e58a..2d32f1a 100644
--- a/npapi/vlcplugin_mac.mm
+++ b/npapi/vlcplugin_mac.mm
@@ -174,11 +174,16 @@ VlcPluginMac::VlcPluginMac(NPP instance, NPuint16_t mode) :
 
 VlcPluginMac::~VlcPluginMac()
 {
-    [fullscreenWindow release];
-    [playbackLayer release];
-    [noMediaLayer release];
-    [controllerLayer release];
-    [browserRootLayer release];
+    if (fullscreenWindow)
+        [fullscreenWindow release];
+    if (playbackLayer)
+        [playbackLayer release];
+    if (noMediaLayer)
+        [noMediaLayer release];
+    if (controllerLayer)
+        [controllerLayer release];
+    if (browserRootLayer)
+        [browserRootLayer release];
 }
 
 void VlcPluginMac::set_player_window()



More information about the vlc-commits mailing list