handle NULL reference exception

This commit is contained in:
John Jenko 2013-11-25 17:56:50 +00:00
parent cc62d25333
commit 196111b836

View File

@ -355,17 +355,19 @@ namespace DataLoader
break; break;
} }
} }
if (prc != null)
// For each transition that points to the A0, make it point to the proc. {
// First, find all of them by getting transitions with the A0 (dummy // For each transition that points to the A0, make it point to the proc.
// transition record). Then update the to or range id in the transition // First, find all of them by getting transitions with the A0 (dummy
// record & then update the content/from part. // transition record). Then update the to or range id in the transition
List<int> transToChg = new List<int>(); // record & then update the content/from part.
List<int> transRgChg = new List<int>(); List<int> transToChg = new List<int>();
TransitionInfoList til = TransitionInfoList.GetByToID(item.ItemID); List<int> transRgChg = new List<int>();
foreach (TransitionInfo ti in til) UpdateTranDataForA0(prc, ti.TransitionID, false); TransitionInfoList til = TransitionInfoList.GetByToID(item.ItemID);
til = TransitionInfoList.GetByRangeID(item.ItemID); foreach (TransitionInfo ti in til) UpdateTranDataForA0(prc, ti.TransitionID, false);
foreach (TransitionInfo tir in til) UpdateTranDataForA0(prc, tir.TransitionID, true); til = TransitionInfoList.GetByRangeID(item.ItemID);
foreach (TransitionInfo tir in til) UpdateTranDataForA0(prc, tir.TransitionID, true);
}
} }
} }
foreach (string str in RemoveFromDicTrans) foreach (string str in RemoveFromDicTrans)