mesa: Handle failure to create a transfer.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 20 Apr 2009 13:53:08 +0000 (14:53 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 20 Apr 2009 15:44:36 +0000 (16:44 +0100)
src/mesa/state_tracker/st_cb_texture.c

index 94e340b7e9422f8cabe748006ac0497af3dfe9ac..c3e990e0775de05b1c27ae9bad4b72ebd1768a5a 100644 (file)
@@ -682,7 +682,8 @@ st_TexImage(GLcontext * ctx,
                                             PIPE_TRANSFER_WRITE, 0, 0,
                                             stImage->base.Width,
                                             stImage->base.Height);
-      dstRowStride = stImage->transfer->stride;
+      if(stImage->transfer)
+         dstRowStride = stImage->transfer->stride;
    }
    else {
       /* Allocate regular memory and store the image there temporarily.   */