only access ss->BufferObjects if it's declared
authorTilman Sauerbeck <tilman@freedesktop.org>
Tue, 11 Jul 2006 19:03:21 +0000 (19:03 +0000)
committerTilman Sauerbeck <tilman@freedesktop.org>
Tue, 11 Jul 2006 19:03:21 +0000 (19:03 +0000)
src/mesa/main/context.c

index 2a7d99a8929b79cd050432cb2fb107634a0ae3ee..e7146cf9b1fe44da13933ed0bd8b5cde7fcf445e 100644 (file)
@@ -697,7 +697,10 @@ alloc_shared_state( GLcontext *ctx )
       goto cleanup;
 #endif
 
+#if FEATURE_ARB_vertex_buffer_object || FEATURE_ARB_pixel_buffer_object
    ss->BufferObjects = _mesa_NewHashTable();
+#endif
+
    ss->ArrayObjects = _mesa_NewHashTable();
 
    ss->GL2Objects = _mesa_NewHashTable ();
@@ -763,7 +766,7 @@ alloc_shared_state( GLcontext *ctx )
    if (ss->DefaultFragmentShader)
       _mesa_delete_ati_fragment_shader(ctx, ss->DefaultFragmentShader);
 #endif
-#if FEATURE_ARB_vertex_buffer_object
+#if FEATURE_ARB_vertex_buffer_object || FEATURE_ARB_pixel_buffer_object
    if (ss->BufferObjects)
       _mesa_DeleteHashTable(ss->BufferObjects);
 #endif
@@ -903,7 +906,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
    _mesa_delete_ati_fragment_shader(ctx, ss->DefaultFragmentShader);
 #endif
 
-#if FEATURE_ARB_vertex_buffer_object
+#if FEATURE_ARB_vertex_buffer_object || FEATURE_ARB_pixel_buffer_object
    _mesa_HashDeleteAll(ss->BufferObjects, delete_bufferobj_cb, ctx);
    _mesa_DeleteHashTable(ss->BufferObjects);
 #endif