فهرست منبع

Fix the bug where the program crashes when xray is not collected.

cxs 4 ماه پیش
والد
کامیت
cf8fa82bd9
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      OTSCPP/OTSClassifyEngine/ExpressionClassifyEngine.cpp

+ 1 - 0
OTSCPP/OTSClassifyEngine/ExpressionClassifyEngine.cpp

@@ -381,6 +381,7 @@ int ExpressionClassifyEngine::GetAtomicNoBySortingPercentage(CString sortingNost
 {
 	std::map<double, CElementChemistryPtr> mapPercent;
 	std::map<int, CElementChemistryPtr> mapSorted;
+	if (xrayInfo == nullptr) return 0;
 	auto eles = xrayInfo->GetElementQuantifyData();
 	if (eles.size() == 0)
 	{