diff --git a/reactos/win32ss/user/ntuser/caret.c b/reactos/win32ss/user/ntuser/caret.c index b52177b7cdd..6b8eeb8cdc0 100644 --- a/reactos/win32ss/user/ntuser/caret.c +++ b/reactos/win32ss/user/ntuser/caret.c @@ -23,6 +23,12 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo) HBITMAP hbmOld; BOOL bDone = FALSE; + if (pWnd == NULL) + { + TRACE("Null Window!\n"); + return; + } + hdc = UserGetDCEx(pWnd, 0, DCX_USESTYLE | DCX_WINDOW); if (!hdc) {