Add missing error handling.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3301 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-11-14 18:44:33 +00:00
parent 9ef52bdc9f
commit acbb2f7b25
+5
View File
@@ -91,6 +91,11 @@ AllocDrawable (COUNT n)
{
int i;
Drawable->Frame = (FRAME)HMalloc (sizeof (FRAME_DESC) * n);
if (Drawable->Frame == NULL)
{
HFree (Drawable);
return NULL;
}
/* Zero out the newly allocated frames, since HMalloc doesn't have
* MEM_ZEROINIT. */