Run method now does an AddRef so it stays alive until the last message can

come through the pump.
This commit is contained in:
rods%netscape.com 1998-09-29 22:16:23 +00:00
parent 1ec1bf28cc
commit e054d0c8fa

View File

@ -60,6 +60,7 @@ NS_METHOD nsAppShell::SetDispatchListener(nsDispatchListener* aDispatchListener)
nsresult nsAppShell::Run()
{
NS_ADDREF_THIS();
// Process messages
MSG msg;
while (GetMessage(&msg, NULL, 0, 0)) {
@ -68,6 +69,7 @@ nsresult nsAppShell::Run()
if (mDispatchListener)
mDispatchListener->AfterDispatch();
}
Release();
return msg.wParam;
}