Skip to content

Commit

Permalink
return geom field seal error
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jan 9, 2025
1 parent ad0dc28 commit c768165
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ogr/ogrgeomfielddefn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,15 @@ OGRSpatialReferenceH OGR_GFld_GetSpatialRef(OGRGeomFieldDefnH hDefn)
*/
void OGRGeomFieldDefn::SetSpatialRef(const OGRSpatialReference *poSRSIn)
{

if (m_bSealed)
{
CPLError(
CE_Failure, CPLE_AppDefined,
"OGRGeomFieldDefn::SetSpatialRef() not allowed on a sealed object");
return;
}

if (poSRS == poSRSIn)
{
return;
Expand Down

0 comments on commit c768165

Please sign in to comment.