Module: wine Branch: master Commit: 55ae86ccb17d58025f07f6c9b440e836bb56e240 URL: http://source.winehq.org/git/wine.git/?a=commit;h=55ae86ccb17d58025f07f6c9b4...
Author: Marcus Meissner marcus@jet.franken.de Date: Sat Jan 31 22:24:51 2009 +0100
winhlp32: Check hlpfile for being NULL (Coverity).
---
programs/winhlp32/winhelp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 15e17f6..7a9e093 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -274,7 +274,7 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name) { strcpy(mwi.type, "primary"); strcpy(mwi.name, "main"); - if (!LoadString(Globals.hInstance, STID_WINE_HELP, + if (hlpfile && !LoadString(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption))) strcpy(mwi.caption, hlpfile->lpszTitle); mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;