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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user