From: Keith Whitwell Date: Mon, 21 Apr 2008 18:11:58 +0000 (+0100) Subject: cso: propogate one easy error - many more X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=785831fc6fc56815d9637c7dd2acbcee6dfbbb0a;p=mesa.git cso: propogate one easy error - many more --- diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c index 18acab09674..f607528fdc7 100644 --- a/src/gallium/auxiliary/cso_cache/cso_cache.c +++ b/src/gallium/auxiliary/cso_cache/cso_cache.c @@ -290,6 +290,8 @@ void * cso_take_state(struct cso_cache *sc, struct cso_cache *cso_cache_create(void) { struct cso_cache *sc = MALLOC_STRUCT(cso_cache); + if (sc == NULL) + return NULL; sc->max_size = 4096; sc->blend_hash = cso_hash_create();