mesa: delete array objects before buffer objects during context tear-down
authorBrian Paul <brianp@vmware.com>
Wed, 13 May 2009 15:47:13 +0000 (09:47 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 13 May 2009 15:47:13 +0000 (09:47 -0600)
The former may point to the later.

src/mesa/main/context.c

index 60c48289e4a7cbc9c863e5f91c8a1662cc6c69ca..ec0dc12a3eb9a443393daaece0e33866c3543fd4 100644 (file)
@@ -1005,10 +1005,11 @@ _mesa_free_context_data( GLcontext *ctx )
    _mesa_free_query_data(ctx);
 #endif
 
+   _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
+
 #if FEATURE_ARB_vertex_buffer_object
    _mesa_delete_buffer_object(ctx, ctx->Array.NullBufferObj);
 #endif
-   _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
 
    /* free dispatch tables */
    _mesa_free(ctx->Exec);