st/mesa: Handle st_framebuffer_create returning NULL
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 13 Jul 2017 07:21:00 +0000 (01:21 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 13 Jul 2017 15:26:20 +0000 (09:26 -0600)
commit655a32f729a46176c1fc0c1727b33c15c69cad78
treecb7656f3e354b2ae1b31d66a4db3e502de1a11d2
parent254fa3dbf57981495f87d0d7e3ef112e04d74cf8
st/mesa: Handle st_framebuffer_create returning NULL

st_framebuffer_create returns NULL if stfbi == NULL or
st_framebuffer_add_renderbuffer returns false for the colour buffer.

Fixes Xorg crashing on startup using glamor on radeonsi.

Fixes: 147d7fb772a7 ("st/mesa: add a winsys buffers list in st_context")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101775
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_manager.c