mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 20:55:16 +00:00
[MSGINA] Prevent an infinite loop in ShellDimScreen. CORE-12028
svn path=/trunk/; revision=72794
This commit is contained in:
parent
6476277b5c
commit
5fbd6598b7
|
@ -104,7 +104,7 @@ public:
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
while (!IsWindowVisible(m_hwnd))
|
while (!IsWindowVisible(m_hwnd) && IsWindow(m_hwnd))
|
||||||
{
|
{
|
||||||
while (::PeekMessage(&msg, m_hwnd, 0, 0, PM_REMOVE))
|
while (::PeekMessage(&msg, m_hwnd, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
|
@ -261,6 +261,15 @@ ShellDimScreen(void** pUnknown, HWND* hWindow)
|
||||||
|
|
||||||
pWindow->WaitForInit();
|
pWindow->WaitForInit();
|
||||||
|
|
||||||
|
if (!IsWindow(pWindow->Wnd()))
|
||||||
|
{
|
||||||
|
refcount = pWindow->AddRef();
|
||||||
|
while (refcount)
|
||||||
|
refcount = pWindow->Release();
|
||||||
|
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
hr = pWindow->QueryInterface(IID_IUnknown, pUnknown);
|
hr = pWindow->QueryInterface(IID_IUnknown, pUnknown);
|
||||||
|
|
Loading…
Reference in a new issue