summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-03-05 14:27:08 +0100
committerFrancisco Jerez <currojerez@riseup.net>2010-03-05 14:27:08 +0100
commitc642b9f7a13bdeecd0a83ddcbf6d6d4f2c287501 (patch)
tree85e423e20cd7b1f41c26ddadc06ccbbbfbfc6146
parentefd7a526ca1cbac10b33b9d5d4cf3e542bc9b73b (diff)
kms: Don't try to copy fbcon contents when there's no framebuffer bound.
drmModeGetFB complains loudly when it's given an invalid framebuffer id, bail out earlier if that's the case. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
-rw-r--r--src/drmmode_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 87ef5ca..df881da 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -187,6 +187,9 @@ drmmode_fbcon_copy(ScreenPtr pScreen)
fbcon_id = drmmode_crtc->mode_crtc->buffer_id;
}
+ if (!fbcon_id)
+ return;
+
fb = drmModeGetFB(nouveau_device(pNv->dev)->fd, fbcon_id);
if (!fb) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,