[ros-diffs] [jimtabor] 33855: Prevent a crash if the list is empty and check for zero. If (List is Empty! DCE!) is called before the crash, this means we have a thread that is not finished running before shutdown. There is a proper way for handling this
jimtabor at svn.reactos.org
jimtabor at svn.reactos.org
Wed Jun 4 18:07:48 CEST 2008
Author: jimtabor
Date: Wed Jun 4 11:07:47 2008
New Revision: 33855
URL: http://svn.reactos.org/svn/reactos?rev=33855&view=rev
Log:
Prevent a crash if the list is empty and check for zero. If (List is Empty! DCE!) is called before the crash, this means we have a thread that is not finished running before shutdown. There is a proper way for handling this
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/windc.c?rev=33855&r1=33854&r2=33855&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Wed Jun 4 11:07:47 2008
@@ -632,6 +632,7 @@
KeEnterCriticalRegion();
do
{
+ if (!pDCE) break;
if (pDCE->hwndCurrent == Window->hSelf)
{
if (!(pDCE->DCXFlags & DCX_CACHE)) /* owned or Class DCE*/
@@ -651,6 +652,7 @@
Window->Wnd->Style & CS_OWNDC) /* owned DCE*/
{
pDCE = DceFreeDCE(pDCE, FALSE);
+ if (!pDCE) break;
Window->Dce = NULL;
continue;
}
More information about the Ros-diffs
mailing list