push "error" if nsDialogs::CreateControl fails

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5255 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-08-25 12:29:04 +00:00
parent c310b82976
commit f6b53539c8

View file

@ -174,10 +174,14 @@ void __declspec(dllexport) CreateControl(HWND hwndParent, int string_size, char
text = &className[g_stringsize];
if (!className)
{
pushstring("error");
return;
}
if (popstring(className, 0))
{
pushstring("error");
HeapFree(GetProcessHeap(), 0, className);
return;
}
@ -189,6 +193,7 @@ void __declspec(dllexport) CreateControl(HWND hwndParent, int string_size, char
if (popstring(text, 0))
{
pushstring("error");
HeapFree(GetProcessHeap(), 0, className);
return;
}