[vlc-devel] commit: Mozilla-plugin: Fix a crash when exiting ( Cyril Mathé )

git version control git at videolan.org
Mon Jul 6 00:31:42 CEST 2009


vlc | branch: master | Cyril Mathé <cmathe at actech-innovation.com> | Thu Jul  2 15:03:58 2009 +0200| [89c901ff961886bfb5633f3bc3bc90e377c8dadf] | committer: Jean-Paul Saman 

Mozilla-plugin: Fix a crash when exiting

Signed-off-by: Jean-Paul Saman <jean-paul.saman at m2x.nl>
(cherry picked from commit 2c1ccdbdd8070a7f0881619be181b9a2906a7dd8)

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

 projects/mozilla/vlcshell.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp
index 2455d8c..37243f7 100644
--- a/projects/mozilla/vlcshell.cpp
+++ b/projects/mozilla/vlcshell.cpp
@@ -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;




More information about the vlc-devel mailing list