Return if the screensaver window couldn't be created to avoid a warning about using the uninitialized variable "msg".

Spotted by KJK & CL

svn path=/trunk/; revision=36946
This commit is contained in:
Colin Finck 2008-10-25 15:14:09 +00:00
parent d0ccc9c5ec
commit 8c81c894b0

View file

@ -185,15 +185,15 @@ static int LaunchScreenSaver(HWND hParent)
0, 0, rc.right, rc.bottom, hParent, NULL,
hMainInstance, NULL);
// Display window and start pumping messages
if (hMainWindow)
{
ShowWindow(hMainWindow, SW_SHOW);
SetCursor(NULL);
if(!hMainWindow)
return 1;
while (GetMessage(&msg, NULL, 0, 0))
DispatchMessage(&msg);
}
// Display window and start pumping messages
ShowWindow(hMainWindow, SW_SHOW);
SetCursor(NULL);
while (GetMessage(&msg, NULL, 0, 0))
DispatchMessage(&msg);
return msg.wParam;
}