r600g/sb: Move variable dereference after null check.

Fixes "Deference before null check" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Vadim Girlin <vadimgirlin@gmail.com>
This commit is contained in:
Vinson Lee 2013-09-27 23:05:54 -07:00
parent 0d441aac3d
commit 114ae47475
1 changed files with 2 additions and 1 deletions

View File

@ -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)