From: Ilia Mirkin Date: Sat, 6 Sep 2014 15:05:20 +0000 (-0400) Subject: nvc0: avoid null deref of screen when collecting stats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=564e3050941dbf6acdb49f974dd114e2b6a21347;p=mesa.git nvc0: avoid null deref of screen when collecting stats Reported by Coverity Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c index 50c2058efca..b33a6731a1c 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c @@ -163,8 +163,8 @@ nvc0_default_kick_notify(struct nouveau_pushbuf *push) nouveau_fence_update(&screen->base, TRUE); if (screen->cur_ctx) screen->cur_ctx->state.flushed = TRUE; + NOUVEAU_DRV_STAT(&screen->base, pushbuf_count, 1); } - NOUVEAU_DRV_STAT(&screen->base, pushbuf_count, 1); } static int