[g3dvl] add skeleton and incomplete idct
[mesa.git] / src / gallium / auxiliary / draw / draw_pipe_offset.c
index e829492423e3b0e9275a0f13c498ebf9acc4858c..8afbbfa1569c026ee25dc3ab6e187e18407b0218 100644 (file)
@@ -163,8 +163,6 @@ struct draw_stage *draw_offset_stage( struct draw_context *draw )
    if (offset == NULL)
       goto fail;
 
-   draw_alloc_temp_verts( &offset->stage, 3 );
-
    offset->stage.draw = draw;
    offset->stage.name = "offset";
    offset->stage.next = NULL;
@@ -175,9 +173,12 @@ struct draw_stage *draw_offset_stage( struct draw_context *draw )
    offset->stage.reset_stipple_counter = offset_reset_stipple_counter;
    offset->stage.destroy = offset_destroy;
 
+   if (!draw_alloc_temp_verts( &offset->stage, 3 ))
+      goto fail;
+
    return &offset->stage;
 
- fail:
+fail:
    if (offset)
       offset->stage.destroy( &offset->stage );