diff mbox

DRI2: Fix cleanup if scheduling page flip failed.

Message ID 1269638729-10746-1-git-send-email-suokkos@gmail.com (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Pauli Nieminen March 26, 2010, 9:25 p.m. UTC
None
diff mbox

Patch

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 321faf6..3aff58c 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -469,7 +469,6 @@  I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
 {
 	ScreenPtr screen = draw->pScreen;
 	I830DRI2BufferPrivatePtr front_priv, back_priv;
-	dri_bo *tmp_bo;
 	DRI2FrameEventPtr flip_info;
 	Bool ret;
 
@@ -485,7 +484,6 @@  I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
 
 	front_priv = front->driverPrivate;
 	back_priv = back->driverPrivate;
-	tmp_bo = i830_get_pixmap_bo(front_priv->pixmap);
 
 	I830DRI2ExchangeBuffers(draw, front, back);
 
@@ -497,9 +495,7 @@  I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
 
 	/* Unwind in case of failure */
 	if (!ret) {
-	    i830_set_pixmap_bo(back_priv->pixmap,
-			       i830_get_pixmap_bo(front_priv->pixmap));
-	    i830_set_pixmap_bo(front_priv->pixmap, tmp_bo);
+	    I830DRI2ExchangeBuffers(draw, front, back);
 	    return FALSE;
 	}