Commit 0eb6bdad authored by Sergey Radionov's avatar Sergey Radionov Committed by Rafaël Carré

activex: first stop playing, only then destroy plugin parts.

fix crash on closing some host applications when media still playing.
Signed-off-by: Rafaël Carré's avatarRafaël Carré <funman@videolan.org>
parent 1aef7d60
......@@ -282,6 +282,14 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
VLCPlugin::~VLCPlugin()
{
if( vlc_player::is_open() )
{
if( isPlaying() )
playlist_stop();
player_unregister_events();
}
delete vlcSupportErrorInfo;
delete vlcOleObject;
delete vlcDataObject;
......@@ -304,14 +312,6 @@ VLCPlugin::~VLCPlugin()
SysFreeString(_bstr_mrl);
SysFreeString(_bstr_baseurl);
if( vlc_player::is_open() )
{
if( isPlaying() )
playlist_stop();
player_unregister_events();
}
if( _p_libvlc ) { libvlc_release(_p_libvlc); _p_libvlc=NULL; }
_p_class->Release();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment