Author: akhaldi Date: Wed Dec 23 18:13:34 2015 New Revision: 70415
URL: http://svn.reactos.org/svn/reactos?rev=70415&view=rev Log: [0.4.0] * Apply the second part of the hackfix from CORE-9836 by Joachim Henze. Addendum to r70393.
Modified: branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/cursoricon.c branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/msgqueue.c
Modified: branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/cursoricon.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/win32ss... ============================================================================== --- branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] Wed Dec 23 18:13:34 2015 @@ -1086,11 +1086,14 @@ goto leave; }
+ pcurOld->CURSORF_flags &= ~CURSORF_CURRENT; + /* See if it was destroyed in the meantime */ if (UserObjectInDestroy(hOldCursor)) - hOldCursor = NULL; - pcurOld->CURSORF_flags &= ~CURSORF_CURRENT; - UserDereferenceObject(pcurOld); + { + UserDereferenceObject(pcurOld); + pcurOld = NULL; + } }
leave:
Modified: branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/msgqueue.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/win32ss... ============================================================================== --- branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Wed Dec 23 18:13:34 2015 @@ -2280,8 +2280,12 @@ IntGetSysCursorInfo()->CurrentCursorObject = NULL; }
- TRACE("DereferenceObject pCursor\n"); - UserDereferenceObject(pCursor); + if (pCursor && UserObjectInDestroy(UserHMGetHandle(pCursor))) + { + TRACE("DereferenceObject pCursor\n"); + UserDereferenceObject(pCursor); + pCursor = NULL; + } }
if (gpqForeground == MessageQueue)