[PATCH] Mozilla-plugin: Fix a crash when exiting

Cyril Mathé cmathe at actech-innovation.com
Thu Jul 2 15:03:58 CEST 2009


---
 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;
-- 
1.5.4.3


--=-lMTJhv5TtMKP/PBlVpfL--



More information about the vlc-devel mailing list