Bug 173206 -- crash after Shockwave registration, r=serge, sr=beard, a=asa

This commit is contained in:
av%netscape.com 2002-10-10 04:23:18 +00:00
Родитель 973f62e3f8
Коммит 7d3fd3a871
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -367,7 +367,7 @@ nsresult nsPluginNativeWindowWin::SubclassAndAssociateWindow()
nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow() nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
{ {
// undo association and release plugin instance // release plugin instance
SetPluginInstance(nsnull); SetPluginInstance(nsnull);
// remove window property // remove window property
@ -376,8 +376,12 @@ nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
::RemoveProp(hWnd, NS_PLUGIN_WINDOW_PROPERTY_ASSOCIATION); ::RemoveProp(hWnd, NS_PLUGIN_WINDOW_PROPERTY_ASSOCIATION);
// restore the original win proc // restore the original win proc
if (mPluginWinProc) // but only do this if this were us last time
SubclassWindow(hWnd, (LONG)mPluginWinProc); if (mPluginWinProc) {
WNDPROC currentWndProc = (WNDPROC)::GetWindowLong(hWnd, GWL_WNDPROC);
if (currentWndProc == PluginWndProc)
SubclassWindow(hWnd, (LONG)mPluginWinProc);
}
return NS_OK; return NS_OK;
} }