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

git-svn-id: svn://10.0.0.236/trunk@131671 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
av%netscape.com
2002-10-10 04:23:18 +00:00
parent 059b4d3c37
commit baae49fa82

View File

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