From: Vinson Lee Date: Sat, 28 Sep 2013 06:05:54 +0000 (-0700) Subject: r600g/sb: Move variable dereference after null check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=114ae4747549b5677cca0dbd2b8c8531d8789c49;p=mesa.git r600g/sb: Move variable dereference after null check. Fixes "Deference before null check" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Vadim Girlin --- diff --git a/src/gallium/drivers/r600/sb/sb_ra_init.cpp b/src/gallium/drivers/r600/sb/sb_ra_init.cpp index 0b332a9847a..e53aba540de 100644 --- a/src/gallium/drivers/r600/sb/sb_ra_init.cpp +++ b/src/gallium/drivers/r600/sb/sb_ra_init.cpp @@ -395,11 +395,12 @@ void ra_init::color_bs_constraint(ra_constraint* c) { for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) { value *v = *I; - sel_chan gpr = v->get_final_gpr(); if (!v || v->is_dead()) continue; + sel_chan gpr = v->get_final_gpr(); + val_set interf; if (v->chunk)