diff --git a/image_analysis/RotationIndexer.cpp b/image_analysis/RotationIndexer.cpp index f1c9794d..9743a42c 100644 --- a/image_analysis/RotationIndexer.cpp +++ b/image_analysis/RotationIndexer.cpp @@ -146,6 +146,8 @@ std::optional RotationIndexer::ProcessImage(int64_t image std::optional RotationIndexer::Finalize(bool retry) { if (!indexed_lattice || retry) TryIndex(); + if (!indexed_lattice) + return std::nullopt; return RotationIndexerResult{ .lattice = indexed_lattice.value(), .search_result = search_result_,