summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe_twoside.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2010-06-16 12:27:20 +0100
committerAlan Hourihane <[email protected]>2010-06-16 12:27:53 +0100
commit1c377cea1094c0b5414c663adf2fd393bf41ddfb (patch)
tree29b43d404690b3cac848994848314770480e26f6 /src/gallium/auxiliary/draw/draw_pipe_twoside.c
parent9829ec2ad8cf74c6dbc7d8afbf36ddd5c5210d74 (diff)
draw: handle some out of memory conditions
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_twoside.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_twoside.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_twoside.c b/src/gallium/auxiliary/draw/draw_pipe_twoside.c
index 808b2fb0b58..9a3f3fee625 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_twoside.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_twoside.c
@@ -177,9 +177,6 @@ struct draw_stage *draw_twoside_stage( struct draw_context *draw )
if (twoside == NULL)
goto fail;
- if (!draw_alloc_temp_verts( &twoside->stage, 3 ))
- goto fail;
-
twoside->stage.draw = draw;
twoside->stage.name = "twoside";
twoside->stage.next = NULL;
@@ -190,6 +187,9 @@ struct draw_stage *draw_twoside_stage( struct draw_context *draw )
twoside->stage.reset_stipple_counter = twoside_reset_stipple_counter;
twoside->stage.destroy = twoside_destroy;
+ if (!draw_alloc_temp_verts( &twoside->stage, 3 ))
+ goto fail;
+
return &twoside->stage;
fail: