From f50bc2fab759c54a49fa3ad96972e0af53cb4bf0 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 12 Dec 2008 19:57:11 +0000 Subject: [PATCH] initialize everything when creating a new dialog to avoid setting leaking from the last dialog git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5846 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/StartMenu/StartMenu.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Contrib/StartMenu/StartMenu.c b/Contrib/StartMenu/StartMenu.c index 69e828d7..d1275ed1 100644 --- a/Contrib/StartMenu/StartMenu.c +++ b/Contrib/StartMenu/StartMenu.c @@ -16,10 +16,10 @@ char progname[1024]; char lastused[1024]; char checkbox[1024]; -int autoadd = 0; -int g_done = 0; -int noicon = 0; -int rtl = 0; +int autoadd; +int g_done; +int noicon; +int rtl; void *lpWndProcOld; @@ -46,6 +46,18 @@ void __declspec(dllexport) Init(HWND hwndParent, int string_size, char *variable extra->RegisterPluginCallback(g_hInstance, PluginCallback); + g_done = 0; + noicon = 0; + rtl = 0; + autoadd = 0; + + text[0] = 0; + progname[0] = 0; + lastused[0] = 0; + checkbox[0] = 0; + + g_hwStartMenuSelect = NULL; + { hwChild = GetDlgItem(hwndParent, 1018); if (!hwChild)