Index: win32ss/user/ntuser/caret.c =================================================================== --- win32ss/user/ntuser/caret.c (revision 73512) +++ win32ss/user/ntuser/caret.c (working copy) @@ -46,7 +46,7 @@ if (!NtGdiGetBitmapDimension(CaretInfo->Bitmap, &CaretInfo->Size)) { ERR("Failed to get bitmap dimensions\n"); - return; + goto cleanup; } hdcMem = NtGdiCreateCompatibleDC(hdc); @@ -79,6 +79,7 @@ DSTINVERT); } +cleanup: if (pWnd->hrgnUpdate) { NtGdiRestoreDC(hdc, -1);