check if fb->Delete is null (bugs 13507,14293)
authorBrian <brian.paul@tungstengraphics.com>
Wed, 30 Jan 2008 15:08:23 +0000 (08:08 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 30 Jan 2008 15:12:42 +0000 (08:12 -0700)
src/mesa/main/context.c

index c793e07b3ad3e3458a91b2d9acd58b0b4ad13b18..e3096b5f9684d0fd1fab7a9c36749b69d7f805d8 100644 (file)
@@ -653,7 +653,12 @@ delete_framebuffer_cb(GLuint id, void *data, void *userData)
     */
    /*assert(fb->RefCount == 1);*/
    fb->RefCount = 0;
-   fb->Delete(fb);
+
+   /* NOTE: Delete should always be defined but there are two reports
+    * of it being NULL (bugs 13507, 14293).  Work-around for now.
+    */
+   if (fb->Delete)
+      fb->Delete(fb);
 }
 
 /**