fully intialize g_sdata and delete g_sdata.script_cmd_args
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5090 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ec12005638
commit
820a1bb7a9
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmd
|
|||
}
|
||||
}
|
||||
if (g_sdata.script) GlobalFree(g_sdata.script);
|
||||
if (g_sdata.script_cmd_args) GlobalFree(g_sdata.script_cmd_args);
|
||||
if (g_sdata.sigint_event) CloseHandle(g_sdata.sigint_event);
|
||||
FinalizeUpdate();
|
||||
ExitProcess(msg.wParam);
|
||||
|
@ -164,6 +165,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
memset(&g_sdata, 0, sizeof(NSCRIPTDATA));
|
||||
g_sdata.hwnd=hwndDlg;
|
||||
HICON hIcon = LoadIcon(g_sdata.hInstance,MAKEINTRESOURCE(IDI_ICON));
|
||||
SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue