renderer: Avoid possible null pointer deref

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Elie Tournier 6 years ago committed by Jakob Bornecrantz
parent 215736003f
commit 3cb469599e
  1. 3
      src/vrend_renderer.c

@ -7652,6 +7652,9 @@ void vrend_renderer_check_queries(void)
bool vrend_hw_switch_context(struct vrend_context *ctx, bool now) bool vrend_hw_switch_context(struct vrend_context *ctx, bool now)
{ {
if (!ctx)
return false;
if (ctx == vrend_state.current_ctx && ctx->ctx_switch_pending == false) if (ctx == vrend_state.current_ctx && ctx->ctx_switch_pending == false)
return true; return true;

Loading…
Cancel
Save