summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-07-13 18:58:04 +0200
committerLucas Stach <l.stach@pengutronix.de>2017-07-14 17:12:00 +0200
commita98c1fbd9bd8601ef4aecb5edbb8af74a32067c2 (patch)
tree2db7491d8f919ab3d37b8eef38e50874725e83a7 /src
parent5295df63ad7822e14e7dabfc107bc416271bfcdc (diff)
st/mesa: handle stfbi being NULL on entry of st_framebuffer_reuse_or_create
Apparently this can happen. Just bail out early in that case, as all the called functions return NULL in that case. Fixes weston-terminal for me. Fixes: 147d7fb772a7 ("st/mesa: add a winsys buffers list in st_context") Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 348b456c4d1..d910eec00a1 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -788,6 +788,9 @@ st_framebuffer_reuse_or_create(struct st_context *st,
{
struct st_framebuffer *cur = NULL, *stfb = NULL;
+ if (!stfbi)
+ return NULL;
+
/* Check if there is already a framebuffer object for the specified
* framebuffer interface in this context. If there is one, use it.
*/