aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_clear.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c
index 19a87aae2..89273e28e 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_clear.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c
@@ -165,6 +165,11 @@ draw_quad(struct st_context *st,
max_slots * sizeof(st->clear.vertices));
}
+ if (!st->clear.vbuf) {
+ /* ran out of memory */
+ return;
+ }
+
/* positions */
st->clear.vertices[0][0][0] = x0;
st->clear.vertices[0][0][1] = y0;