llvmpipe: don't crash/assert on out of memory
[mesa.git] / src / gallium / drivers / llvmpipe / lp_rast_priv.h
index d33dd49f3a7dba7d4bf13bc7afdafaea80301b21..9bded086efcfb48805b9f29ba91aad323262a34f 100644 (file)
@@ -172,7 +172,8 @@ lp_rast_get_color_block_pointer(struct lp_rasterizer_task *task,
    assert((y % TILE_VECTOR_HEIGHT) == 0);
 
    color = task->color_tiles[buf];
-   assert(color);
+   if (!color)
+      return NULL;
 
    px = x % TILE_SIZE;
    py = y % TILE_SIZE;