diff --git a/ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp b/ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp index c39a631a3007..8d858cef8743 100644 --- a/ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp +++ b/ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp @@ -333,8 +333,8 @@ OGRMiraMonLayer::OGRMiraMonLayer(GDALDataset *poDS, const char *pszFilename, delete m_poSRS; m_poSRS = nullptr; } - m_poSRS->SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER); - poFeatureDefn->GetGeomFieldDefn(0)->SetSpatialRef(m_poSRS); + if (m_poSRS) + poFeatureDefn->GetGeomFieldDefn(0)->SetSpatialRef(m_poSRS); } // If there is associated information