[vlc-commits] commit: activex: stop processing events on closing ActiveX plugin ( Jean-Paul Saman )

git at videolan.org git at videolan.org
Thu Mar 18 11:19:17 CET 2010


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed Mar 17 16:52:43 2010 +0100| [d6b836537f0ec4d51611636bce02ca9c24dd16fe] | committer: Jean-Paul Saman 

activex: stop processing events on closing ActiveX plugin

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

 projects/activex/connectioncontainer.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/projects/activex/connectioncontainer.cpp b/projects/activex/connectioncontainer.cpp
index fbceb7e..91fd0b6 100644
--- a/projects/activex/connectioncontainer.cpp
+++ b/projects/activex/connectioncontainer.cpp
@@ -163,10 +163,17 @@ DWORD WINAPI ThreadProcEventHandler(LPVOID lpParam)
             pCPC->_q_events.pop();
             pCPC->_p_events->fireEvent(ev->_dispId, &ev->_dispParams);
             delete ev;
+
+
+            if (!pCPC->isRunning)
+            {
+                LeaveCriticalSection(&(pCPC->csEvents));
+                goto out;
+            }
         }
         LeaveCriticalSection(&(pCPC->csEvents));
     }
-
+out:
     CoUninitialize();
     return 0;
 }



More information about the vlc-commits mailing list