diff options
author | Alan Hourihane <[email protected]> | 2010-06-16 18:10:34 +0100 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2010-06-16 18:10:34 +0100 |
commit | 867478b6f6fe3ad76c3d1d75b2b907f59b9a649c (patch) | |
tree | 12ee92f1b16822600f5e5f82905db86230a5fb15 /src/gallium/auxiliary/util | |
parent | 51729b5119df450f2f80c4e648b99fa35b9ec32d (diff) |
util: add alloc check
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_upload_mgr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 75d44432d9e..af229e61a00 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -59,6 +59,8 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, unsigned usage ) { struct u_upload_mgr *upload = CALLOC_STRUCT( u_upload_mgr ); + if (!upload) + return NULL; upload->pipe = pipe; upload->default_size = default_size; |