diff options
author | José Fonseca <[email protected]> | 2008-04-15 15:58:14 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-04-15 15:58:14 +0900 |
commit | 7619240cc0c24d3ad4d2424e65110c0326a12dad (patch) | |
tree | 3e4dac2d41053375199aced431d80ea238be6396 /src/gallium/auxiliary | |
parent | 95aeeb6d746e57473116ef4d72c05330902f68a5 (diff) |
gallium: Fix seg fault (James Vogt).
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c index bffca5b2449..9d809e2f9b5 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c @@ -30,7 +30,7 @@ * \file * A buffer manager that wraps buffers in fenced buffers. * - * \author Jos� Fonseca <[email protected]> + * \author José Fonseca <[email protected]> */ @@ -101,7 +101,8 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) fenced_buffer_list_destroy(fenced_mgr->fenced_list); - fenced_mgr->provider->destroy(fenced_mgr->provider); + if(fenced_mgr->provider) + fenced_mgr->provider->destroy(fenced_mgr->provider); FREE(fenced_mgr); } @@ -113,6 +114,9 @@ fenced_bufmgr_create(struct pb_manager *provider, { struct fenced_pb_manager *fenced_mgr; + if(!provider) + return NULL; + fenced_mgr = (struct fenced_pb_manager *)CALLOC(1, sizeof(*fenced_mgr)); if (!fenced_mgr) return NULL; |