From 564e3050941dbf6acdb49f974dd114e2b6a21347 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 6 Sep 2014 11:05:20 -0400 Subject: [PATCH] nvc0: avoid null deref of screen when collecting stats Reported by Coverity Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2