handle NULL reference exception
This commit is contained in:
		@@ -355,17 +355,19 @@ namespace DataLoader
 | 
			
		||||
							break;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					// 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
 | 
			
		||||
					// transition record).  Then update the to or range id in the transition
 | 
			
		||||
					// record & then update the content/from part.
 | 
			
		||||
					List<int> transToChg = new List<int>();
 | 
			
		||||
					List<int> transRgChg = new List<int>();
 | 
			
		||||
					TransitionInfoList til = TransitionInfoList.GetByToID(item.ItemID);
 | 
			
		||||
					foreach (TransitionInfo ti in til) UpdateTranDataForA0(prc, ti.TransitionID, false);
 | 
			
		||||
					til = TransitionInfoList.GetByRangeID(item.ItemID);
 | 
			
		||||
					foreach (TransitionInfo tir in til) UpdateTranDataForA0(prc, tir.TransitionID, true);
 | 
			
		||||
					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
 | 
			
		||||
						// transition record).  Then update the to or range id in the transition
 | 
			
		||||
						// record & then update the content/from part.
 | 
			
		||||
						List<int> transToChg = new List<int>();
 | 
			
		||||
						List<int> transRgChg = new List<int>();
 | 
			
		||||
						TransitionInfoList til = TransitionInfoList.GetByToID(item.ItemID);
 | 
			
		||||
						foreach (TransitionInfo ti in til) UpdateTranDataForA0(prc, ti.TransitionID, false);
 | 
			
		||||
						til = TransitionInfoList.GetByRangeID(item.ItemID);
 | 
			
		||||
						foreach (TransitionInfo tir in til) UpdateTranDataForA0(prc, tir.TransitionID, true);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			foreach (string str in RemoveFromDicTrans)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user