Check for out of memory when creating fence

This commit is contained in:
Alan Hourihane 2011-02-26 10:30:19 +00:00
parent ca8a91ff7e
commit 53fe5b334e
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ lp_fence_create(unsigned rank)
static int fence_id;
struct lp_fence *fence = CALLOC_STRUCT(lp_fence);
if (!fence)
return NULL;
pipe_reference_init(&fence->reference, 1);
pipe_mutex_init(fence->mutex);