diff --git a/src/AnalyzeView/GeoTagController.cc b/src/AnalyzeView/GeoTagController.cc index 33ee123fc3f81901b8c32c4a7afe0f583828bb49..2db65e718c9c80b439a229d00c54ddf80666e5ee 100644 --- a/src/AnalyzeView/GeoTagController.cc +++ b/src/AnalyzeView/GeoTagController.cc @@ -259,6 +259,11 @@ void GeoTagWorker::run(void) int maxIndex = std::min(_imageIndices.count(), _triggerIndices.count()); maxIndex = std::min(maxIndex, _imageList.count()); for(int i = 0; i < maxIndex; i++) { + int imageIndex = _imageIndices[i]; + if (imageIndex >= _imageList.count()) { + emit error(tr("Geotagging failed. Image requested not present.")); + return; + } QFile fileRead(_imageList.at(_imageIndices[i]).absoluteFilePath()); if (!fileRead.open(QIODevice::ReadOnly)) { emit error(tr("Geotagging failed. Couldn't open an image.")); diff --git a/src/AnalyzeView/ULogParser.cc b/src/AnalyzeView/ULogParser.cc index 8a7e172bcd85d6d54fba277948cb9cd72e47a3ae..806dfd052e1733babdd6f4b7cc6c60c56f4233ca 100644 --- a/src/AnalyzeView/ULogParser.cc +++ b/src/AnalyzeView/ULogParser.cc @@ -139,15 +139,10 @@ bool ULogParser::getTagsFromLog(QByteArray& log, QList