sna: Check for failure to pin the front buffer

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-08-16 20:44:32 +01:00
parent c9db2c74ab
commit 5675c36e0d
1 changed files with 3 additions and 0 deletions

View File

@ -964,6 +964,9 @@ static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
DBG(("%s: attaching to framebuffer\n", __FUNCTION__));
sna_crtc_disable_shadow(sna, sna_crtc);
bo = sna_pixmap_pin(sna->front);
if (bo == NULL)
return NULL;
if (!get_fb(sna, bo, scrn->virtualX, scrn->virtualY))
return NULL;