From: Marek Olšák <marek.ol...@amd.com>

Cc: 11.0 <mesa-sta...@lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_pipe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index 9094427..787669f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -180,6 +180,8 @@ static struct pipe_context *si_create_context(struct 
pipe_screen *screen,
        if (sctx->b.chip_class == CIK) {
                sctx->null_const_buf.buffer = pipe_buffer_create(screen, 
PIPE_BIND_CONSTANT_BUFFER,
                                                                 
PIPE_USAGE_DEFAULT, 16);
+               if (!sctx->null_const_buf.buffer)
+                       goto fail;
                sctx->null_const_buf.buffer_size = 
sctx->null_const_buf.buffer->width0;
 
                for (shader = 0; shader < SI_NUM_SHADERS; shader++) {
-- 
2.1.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to