[ros-diffs] [navaraf] 14278: Merge from HEAD: r14166

navaraf at svn.reactos.com navaraf at svn.reactos.com
Wed Mar 23 18:08:26 CET 2005


Merge from HEAD: r14166
(GDIOBJ_SetOwnership): Don't try to decrease the GDI object counter for
global handles since they're not associated with process.
Modified:
branches/ros-branch-0_2_6/reactos/subsys/win32k/objects/gdiobj.c
  _____  

Modified:
branches/ros-branch-0_2_6/reactos/subsys/win32k/objects/gdiobj.c
--- branches/ros-branch-0_2_6/reactos/subsys/win32k/objects/gdiobj.c
2005-03-23 17:07:48 UTC (rev 14277)
+++ branches/ros-branch-0_2_6/reactos/subsys/win32k/objects/gdiobj.c
2005-03-23 17:08:24 UTC (rev 14278)
@@ -1216,15 +1216,18 @@

 
           /* dereference the process' object counter */
           /* FIXME */
-          Status =
PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1),
&OldProcess);
-          if(NT_SUCCESS(Status))
+          if((ULONG_PTR)PrevProcId & ~0x1)
           {
-            W32Process = OldProcess->Win32Process;
-            if(W32Process != NULL)
+            Status =
PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1),
&OldProcess);
+            if(NT_SUCCESS(Status))
             {
-              InterlockedDecrement(&W32Process->GDIObjects);
+              W32Process = OldProcess->Win32Process;
+              if(W32Process != NULL)
+              {
+                InterlockedDecrement(&W32Process->GDIObjects);
+              }
+              ObDereferenceObject(OldProcess);
             }
-            ObDereferenceObject(OldProcess);
           }
 
           if(NewOwner != NULL)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050323/90afbe57/attachment.html


More information about the Ros-diffs mailing list