diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index f0a689323ad..5a25d6c9449 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -607,7 +607,7 @@ static void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id) LPSTR ptr; WINE_TRACE("(%s, %s)\n", debugstr_a(lpszPathWindow), debugstr_a(topic_id)); - if ((ptr = strchr(lpszPathWindow, '>')) != NULL) + if (lpszPathWindow && (ptr = strchr(lpszPathWindow, '>')) != NULL) { LPSTR tmp; size_t sz;