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 18acab096749c51a46415f6d1feff4f72c90e873..f607528fdc72daa314162df5826c75da44b3a2f3 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();