xorg-x11-server/xserver-1.6.99-dri2-crash-fixes.patch
Adam Jackson 780d7d89a1 * Thu Aug 06 2009 Adam Jackson <ajax@redhat.com> 1.6.99-28.20090804
- xserver-1.6.99-dri2-crash-fixes.patch: don't cough and die just because
  the driver had the gall not to register a SwapBuffers handler.
2009-08-06 18:05:30 +00:00

27 lines
794 B
Diff

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