diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-25 16:33:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-25 16:33:31 +0100 |
commit | 28fffbd1d07890c8b4d697369159f6a30f267675 (patch) | |
tree | 390bc467b10413be74dc3287c10e7bab7065bb5d | |
parent | 2c73b4651a04390668c3ed2aa10699663e44fd8a (diff) |
sna/display: Protect against drmModeGetCrtc returning NULL
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 285a39b7..1586884b 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -526,6 +526,9 @@ void sna_copy_fbcon(struct sna *sna) mode_crtc = drmModeGetCrtc(sna->kgem.fd, sna->mode.mode_res->crtcs[crtc->num]); + if (mode_crtc == NULL) + continue; + if (mode_crtc->buffer_id) fbcon = drmModeGetFB(sna->kgem.fd, mode_crtc->buffer_id); |