Double free error fix

pull/717/head
Piero Toffanin 2017-11-20 11:27:07 -05:00
rodzic c45e6defd2
commit 62dec4bb95
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1067,8 +1067,9 @@ void Georef::createGeoreferencedModelFromExifData()
// Remove invalid cameras
std::vector<GeorefCamera> goodCameras;
for (size_t i = 0; i < cameras_.size(); i++){
if (cameras_[i].isValid()) goodCameras.push_back(cameras_[i]);
if (cameras_[i].isValid()) goodCameras.push_back(GeorefCamera(cameras_[i]));
}
cameras_.clear();
cameras_ = goodCameras;
// The optimal camera triplet.