diff --git a/scanmatcher/scanmatcher.cpp b/scanmatcher/scanmatcher.cpp index 8f2c3ac..d57e96c 100644 --- a/scanmatcher/scanmatcher.cpp +++ b/scanmatcher/scanmatcher.cpp @@ -560,7 +560,11 @@ void ScanMatcher::setLaserParameters /*if (m_laserAngles) delete [] m_laserAngles; */ - assert(beamsLASER_MAXBEAMS) { + cerr << "Number of beams (" << beams << ") is larger than maximum supported value (" << + LASER_MAXBEAMS << ")." << endl; + exit(-1); + } m_laserPose=lpose; m_laserBeams=beams; //m_laserAngles=new double[beams];