Commit 69f97d37 authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Check pointer state

parent 47a03f3e
Pipeline #5667 failed with stages
in 95 minutes and 27 seconds
......@@ -113,7 +113,7 @@ void GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>::Insta
}
// If not, try to make a RPC sensor model
if ((m_InputTransform.IsNull()) && (m_InputImd->Has(MDGeom::RPC)))
if ((m_InputTransform.IsNull()) && (m_InputImd != nullptr) && (m_InputImd->Has(MDGeom::RPC)))
{
typedef otb::RPCForwardTransform<double, InputSpaceDimension, OutputSpaceDimension> RPCForwardTransformType;
typename RPCForwardTransformType::Pointer sensorModel = RPCForwardTransformType::New();
......@@ -145,7 +145,7 @@ void GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions>::Insta
}
// If not, try to make a RPC sensor model
if ((m_OutputTransform.IsNull()) && (m_OutputImd->Has(MDGeom::RPC)))
if ((m_OutputTransform.IsNull()) && (m_OutputImd != nullptr) && (m_OutputImd->Has(MDGeom::RPC)))
{
typedef otb::RPCInverseTransform<double, InputSpaceDimension, OutputSpaceDimension> RPCInverseTransformType;
typename RPCInverseTransformType::Pointer sensorModel = RPCInverseTransformType::New();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment