Commit ab6cff73 authored by Sergey Radionov's avatar Sergey Radionov Committed by Jean-Baptiste Kempf

npapi win32: added prerequisites checks to VlcPluginWin::destroy_windows

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9828de08
......@@ -170,11 +170,17 @@ bool VlcPluginWin::destroy_windows()
{
_WindowsManager.DestroyWindows();
/* reset WNDPROC */
HWND oldwin = (HWND)npwindow.window;
SetWindowLongPtr( oldwin, GWLP_WNDPROC, (LONG_PTR)(getWindowProc()) );
setWindowProc(NULL);
if(oldwin){
WNDPROC winproc = getWindowProc();
if( winproc )
{
/* reset WNDPROC */
SetWindowLongPtr( oldwin, GWLP_WNDPROC, (LONG_PTR)winproc );
setWindowProc(NULL);
}
npwindow.window = NULL;
}
npwindow.window = NULL;
return true;
}
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