[MSGINA] Prevent an infinite loop in ShellDimScreen. CORE-12028

svn path=/trunk/; revision=72794
This commit is contained in:
Mark Jansen 2016-09-24 14:15:23 +00:00
parent 6476277b5c
commit 5fbd6598b7

View file

@ -104,7 +104,7 @@ public:
{
MSG msg;
while (!IsWindowVisible(m_hwnd))
while (!IsWindowVisible(m_hwnd) && IsWindow(m_hwnd))
{
while (::PeekMessage(&msg, m_hwnd, 0, 0, PM_REMOVE))
{
@ -261,6 +261,15 @@ ShellDimScreen(void** pUnknown, HWND* hWindow)
pWindow->WaitForInit();
if (!IsWindow(pWindow->Wnd()))
{
refcount = pWindow->AddRef();
while (refcount)
refcount = pWindow->Release();
return E_FAIL;
}
_SEH2_TRY
{
hr = pWindow->QueryInterface(IID_IUnknown, pUnknown);