Module: Mesa Branch: master Commit: 867478b6f6fe3ad76c3d1d75b2b907f59b9a649c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=867478b6f6fe3ad76c3d1d75b2b907f59b9a649c
Author: Alan Hourihane <al...@vmware.com> Date: Wed Jun 16 18:10:34 2010 +0100 util: add alloc check --- 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 75d4443..af229e6 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; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit