]> git.sesse.net Git - vlc/commitdiff
Mozilla-plugin: Fix a crash when exiting
authorCyril Mathé <cmathe@actech-innovation.com>
Thu, 2 Jul 2009 13:03:58 +0000 (15:03 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Sun, 5 Jul 2009 22:31:10 +0000 (00:31 +0200)
Signed-off-by: Jean-Paul Saman <jean-paul.saman@m2x.nl>
(cherry picked from commit 2c1ccdbdd8070a7f0881619be181b9a2906a7dd8)

projects/mozilla/vlcshell.cpp

index 2455d8c736f365e155ff953ae1961ac43d115f71..37243f7200010abfe875dfe5c9ac775ac8349935 100644 (file)
@@ -341,6 +341,16 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
     }
 #endif
 
+    libvlc_exception_t ex;
+    libvlc_exception_init(&ex);
+    int val = p_plugin->playlist_isplaying(&ex);
+    libvlc_exception_clear(&ex);
+    if(val)
+    {
+        p_plugin->playlist_stop(&ex);
+        libvlc_exception_clear(&ex);
+    }
+
     delete p_plugin;
 
     return NPERR_NO_ERROR;