diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/crs.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index 9c4c04c3..6bf607fa 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -2517,10 +2517,17 @@ bool GeographicCRS::is2DPartOf3D(util::nn<const GeographicCRS *> other, util::IComparable::Criterion::EQUIVALENT))) { return false; } - const auto thisDatum = datumNonNull(dbContext); - const auto otherDatum = other->datumNonNull(dbContext); - return thisDatum->_isEquivalentTo(otherDatum.get(), - util::IComparable::Criterion::EQUIVALENT); + try { + const auto thisDatum = datumNonNull(dbContext); + const auto otherDatum = other->datumNonNull(dbContext); + return thisDatum->_isEquivalentTo( + otherDatum.get(), util::IComparable::Criterion::EQUIVALENT); + } catch (const util::InvalidValueTypeException &) { + // should not happen really, but potentially thrown by + // Identifier::Private::setProperties() + assert(false); + return false; + } } //! @endcond |
