Blob Blame History Raw
From 6ba2c0f1e15b0dc6126c668461746d134b6e396d Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 5 Aug 2009 15:02:03 -0400
Subject: [PATCH] dri2: fix pageflipping code to not crash non-flipping drivers

---
 hw/xfree86/dri2/dri2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 7b9fb23..9958bca 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -392,7 +392,8 @@ DRI2SwapBuffers(DrawablePtr pDraw)
     if (pSrcBuffer == NULL || pDestBuffer == NULL)
 	return BadValue;
 
-    if (DRI2FlipCheck(pDraw) &&
+    if (ds->SwapBuffers &&
+        DRI2FlipCheck(pDraw) &&
 	(*ds->SwapBuffers)(pDraw, pDestBuffer, pSrcBuffer, pPriv))
     {
 	pPriv->swapPending = TRUE;
-- 
1.6.4