- Giannis Adamopoulos: Only dereference a class if it's valid, should fix Heroes 3 crash.
See issue #5606 for more details.

svn path=/trunk/; revision=48732
This commit is contained in:
Aleksey Bragin 2010-09-10 18:13:02 +00:00
parent cacc80ae3e
commit 0955523e4f

View file

@ -2184,7 +2184,7 @@ CLEANUP:
/* If the window was created, the class will be dereferenced by co_UserDestroyWindow */
if (Window)
co_UserDestroyWindow(Window);
else
else if (Class)
IntDereferenceClass(Class, pti->pDeskInfo, pti->ppi);
}