diff --git a/garouter/gaChannel.c b/garouter/gaChannel.c index 718631d9..a7b9a584 100644 --- a/garouter/gaChannel.c +++ b/garouter/gaChannel.c @@ -381,11 +381,17 @@ gaChannelStats(list) tot = &gaTotRiverCross; clear = &gaClearRiverCross; break; + default: /* otherwise tot and clear is not intialized */ + tot = NULL; + clear = NULL; + break; + } + if(tot && clear) { + gaPinStats(ch->gcr_tPins, ch->gcr_length, tot, clear); + gaPinStats(ch->gcr_bPins, ch->gcr_length, tot, clear); + gaPinStats(ch->gcr_lPins, ch->gcr_width, tot, clear); + gaPinStats(ch->gcr_rPins, ch->gcr_width, tot, clear); } - gaPinStats(ch->gcr_tPins, ch->gcr_length, tot, clear); - gaPinStats(ch->gcr_bPins, ch->gcr_length, tot, clear); - gaPinStats(ch->gcr_lPins, ch->gcr_width, tot, clear); - gaPinStats(ch->gcr_rPins, ch->gcr_width, tot, clear); } numTot = gaTotRiverCross + gaTotNormCross;