X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fwin32ss%2Fuser%2Fntuser%2Fcaret.c;h=a7549e752d7f9d2198744b562a221fd6e7a0e88f;hp=d415918271a9d5119549c5e70e083ef2b6151d7c;hb=e8801e23b6d9ff4619165bc9e12c73804d56a523;hpb=657d78a38709e68d3f849d4ac11dec134decc5b6 diff --git a/reactos/win32ss/user/ntuser/caret.c b/reactos/win32ss/user/ntuser/caret.c index d415918271a..a7549e752d7 100644 --- a/reactos/win32ss/user/ntuser/caret.c +++ b/reactos/win32ss/user/ntuser/caret.c @@ -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);