[intel] Assert against 0-sized buffers in dri_bufmgr_fake.c.

They shouldn't be created, and this often helps catch stupid issues.
This commit is contained in:
Eric Anholt
2007-11-16 14:38:09 -08:00
parent 00eb5635c6
commit 4bc625e378
@@ -554,6 +554,8 @@ dri_fake_bo_alloc(dri_bufmgr *bufmgr, const char *name,
bufmgr_fake = (dri_bufmgr_fake *)bufmgr;
assert(size != 0);
bo_fake = calloc(1, sizeof(*bo_fake));
if (!bo_fake)
return NULL;
@@ -590,6 +592,8 @@ dri_fake_bo_alloc_static(dri_bufmgr *bufmgr, const char *name,
bufmgr_fake = (dri_bufmgr_fake *)bufmgr;
assert(size != 0);
bo_fake = calloc(1, sizeof(*bo_fake));
if (!bo_fake)
return NULL;