cso: propogate one easy error - many more
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 18:11:58 +0000 (19:11 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 18:12:08 +0000 (19:12 +0100)
src/gallium/auxiliary/cso_cache/cso_cache.c

index 18acab0..f607528 100644 (file)
@@ -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();