[WIN32SS] Don't trigger ProbeForWrite when retrieving caret size from co_IntDrawCaret...
[reactos.git] / reactos / win32ss / user / ntuser / caret.c
index 6f6bc3e..a7549e7 100644 (file)
@@ -2,7 +2,7 @@
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS Win32k subsystem
  * PURPOSE:          Caret functions
- * FILE:             subsystems/win32/win32k/ntuser/caret.c
+ * FILE:             win32ss/user/ntuser/caret.c
  * PROGRAMER:        Thomas Weidenmueller (w3seek@users.sourceforge.net)
  */
 
@@ -43,10 +43,10 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
 
     if (CaretInfo->Bitmap)
     {
-        if (!NtGdiGetBitmapDimension(CaretInfo->Bitmap, &CaretInfo->Size))
+        if (!GreGetBitmapDimension(CaretInfo->Bitmap, &CaretInfo->Size))
         {
             ERR("Failed to get bitmap dimensions\n");
-            return;
+            goto cleanup;
         }
 
         hdcMem = NtGdiCreateCompatibleDC(hdc);
@@ -79,6 +79,7 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
                     DSTINVERT);
     }
 
+cleanup:
     if (pWnd->hrgnUpdate)
     {
        NtGdiRestoreDC(hdc, -1);