gallium: added null ptr check
authorBrian <brian.paul@tungstengraphics.com>
Tue, 12 Feb 2008 23:37:49 +0000 (16:37 -0700)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 15 Feb 2008 02:51:11 +0000 (13:51 +1100)
src/mesa/state_tracker/st_cb_texture.c

index fab9eafc7f0994a142af8ff5e231d38b24335f49..c6fe928d471fe4245d1590031254d92b7abc02aa 100644 (file)
@@ -1514,7 +1514,7 @@ st_finalize_texture(GLcontext *ctx,
 
          /* Need to import images in main memory or held in other textures.
           */
-         if (stObj->pt != stImage->pt) {
+         if (stImage && stObj->pt != stImage->pt) {
             copy_image_data_to_texture(ctx->st, stObj, level, stImage);
            *needFlush = GL_TRUE;
          }