diff --git a/src/system/positions/positionsys_camera.cpp b/src/system/positions/positionsys_camera.cpp index b15038e..6c4d481 100644 --- a/src/system/positions/positionsys_camera.cpp +++ b/src/system/positions/positionsys_camera.cpp @@ -60,7 +60,7 @@ void PositionSysCamera::update(){ do{ valid_data = getDataAtIndex_backwardsFromCurrent(i); i++; - }while(!valid_data.ySeen && !valid_data.bSeen); + }while(!valid_data.ySeen && !valid_data.bSeen && i < dim); if(valid_data.ySeen || valid_data.bSeen){ posx = valid_data.posx;