fix kernel panic (vector out of range) in getReadoutRawString

This commit is contained in:
Frank Haverland
2022-10-31 20:44:55 +01:00
parent b6b7587f0a
commit 2265563b23
4 changed files with 33 additions and 2 deletions

View File

@@ -972,7 +972,7 @@ string ClassFlowCNNGeneral::getReadoutRawString(int _analog)
{
string rt = "";
if (GENERAL[_analog]->ROI.size() == 0)
if (_analog >= GENERAL.size() || GENERAL[_analog]==NULL || GENERAL[_analog]->ROI.size() == 0)
return rt;
for (int i = 0; i < GENERAL[_analog]->ROI.size(); ++i)