diff options
-rw-r--r-- | src/radeon_dri2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index b29d88bc..466d7004 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -641,9 +641,9 @@ xf86CrtcPtr radeon_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled) if (priv->crtc && priv->crtc != crtc) { CARD64 ust, mscold, mscnew; - radeon_dri2_get_crtc_msc(priv->crtc, &ust, &mscold); - radeon_dri2_get_crtc_msc(crtc, &ust, &mscnew); - priv->vblank_delta += mscold - mscnew; + if (radeon_dri2_get_crtc_msc(priv->crtc, &ust, &mscold) && + radeon_dri2_get_crtc_msc(crtc, &ust, &mscnew)) + priv->vblank_delta += mscold - mscnew; } priv->crtc = crtc; |