Fix a refcounting mistake with first_swap_fence.
authorEric Anholt <eric@anholt.net>
Fri, 18 May 2007 20:47:46 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 18 May 2007 20:47:46 +0000 (13:47 -0700)
src/mesa/drivers/dri/i915tex/intel_blit.c

index ef596bdfc550da875f8fb07fbb2750027686d2a2..5d97f08434afc9af4268fc9de1d061f3106ff49a 100644 (file)
@@ -152,8 +152,8 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
       if (intel->first_swap_fence)
         dri_fence_unreference(intel->first_swap_fence);
       intel_batchbuffer_flush(intel->batch);
-      dri_fence_reference(intel->first_swap_fence);
       intel->first_swap_fence = intel->batch->last_fence;
+      dri_fence_reference(intel->first_swap_fence);
    }
 
    UNLOCK_HARDWARE(intel);