summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud/hud_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_context.c')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index c44f8c01a31..29ef9eee31c 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -581,6 +581,10 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex)
hud->color_prims.buffer_size,
16, &hud->bg.vbuf.buffer_offset, &hud->bg.vbuf.buffer,
(void**)&hud->bg.vertices);
+ if (!hud->bg.vertices) {
+ goto out;
+ }
+
pipe_resource_reference(&hud->whitelines.vbuf.buffer, hud->bg.vbuf.buffer);
pipe_resource_reference(&hud->text.vbuf.buffer, hud->bg.vbuf.buffer);
pipe_resource_reference(&hud->color_prims.vbuf.buffer, hud->bg.vbuf.buffer);
@@ -690,6 +694,7 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex)
hud_pane_draw_colored_objects(hud, pane);
}
+out:
cso_restore_state(cso);
cso_restore_constant_buffer_slot0(cso, PIPE_SHADER_VERTEX);