Skip to content

Commit

Permalink
Avoiding nullptr acces
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelPau committed Apr 4, 2024
1 parent 2bd8c58 commit b4d0a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4d0a69

Please sign in to comment.