[WIN32K]
authorJérôme Gardou <jerome.gardou@reactos.org>
Thu, 23 Oct 2014 09:32:46 +0000 (09:32 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Thu, 23 Oct 2014 09:32:46 +0000 (09:32 +0000)
 - Reference cursor and icon objects when copying a class from one heap to another.
CORE-7575

svn path=/trunk/; revision=64914

reactos/win32ss/user/ntuser/class.c

index dd95752..8fa1614 100644 (file)
@@ -838,6 +838,16 @@ IntMoveClassToSharedHeap(IN OUT PCLS Class,
         NewClass->rpdeskParent = NULL;
         NewClass->pclsBase = NewClass;
 
+#ifdef NEW_CURSORICON
+        if (NewClass->spcur)
+            UserReferenceObject(NewClass->spcur);
+        if (NewClass->spicn)
+            UserReferenceObject(NewClass->spicn);
+        if (NewClass->spicnSm)
+            UserReferenceObject(NewClass->spicnSm);
+#endif
+
+
         /* Replace the class in the list */
         (void)InterlockedExchangePointer((PVOID*)*ClassLinkPtr,
                                          NewClass);