move code to prevent NULL ptr dereference (bug 11810)
authorBrian <brian.paul@tungstengraphics.com>
Thu, 2 Aug 2007 14:31:44 +0000 (08:31 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 2 Aug 2007 14:31:44 +0000 (08:31 -0600)
src/mesa/drivers/dri/i915tex/intel_span.c

index ab0874e4fd6569f271e0ff43fca7e3b9595ed08f..d1f8ef06beb36d8be01fe2ea9e20d58d5d86cfb2 100644 (file)
@@ -198,9 +198,9 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map)
                   intel_region_map(intel->intelScreen, irb->region);
                else
                   intel_region_unmap(intel->intelScreen, irb->region);
+               irb->pfMap = irb->region->map;
+               irb->pfPitch = irb->region->pitch;
             }
-            irb->pfMap = irb->region->map;
-            irb->pfPitch = irb->region->pitch;
          }
       }
    }