From 649a512324d7a0b7aa039f17d2f049ca0a070125 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 2 Oct 2003 11:46:04 +0000 Subject: [PATCH] make sure the notify HWND is valid git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2988 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/makenssi.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/makenssi.cpp b/Source/makenssi.cpp index 699433cb..ca09388d 100644 --- a/Source/makenssi.cpp +++ b/Source/makenssi.cpp @@ -207,7 +207,12 @@ int main(int argc, char **argv) build.print_help(NULL); nousage++; } - else if (!stricmp(argv[argpos],"/NOTIFYHWND")) build.notify_hwnd=(HWND)atol(argv[++argpos]); + else if (!stricmp(argv[argpos],"/NOTIFYHWND")) + { + build.notify_hwnd=(HWND)atol(argv[++argpos]); + if (!IsWindow(build.notify_hwnd)) + build.notify_hwnd=0; + } else if (!stricmp(argv[argpos],"/HDRINFO")) { if (build.display_info)