Skip to content

Commit

Permalink
OGR_PDF: add missing whileUnsealing(poLayerDefn) (master only)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Feb 8, 2024
1 parent e0db75a commit e0b1f9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frmts/pdf/ogrpdflayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,17 @@ void OGRPDFLayer::Fill(GDALPDFArray *poArray)
OGRGeometry *poGeom = poFeature->GetGeometryRef();
if (!bGeomTypeMixed && poGeom != nullptr)
{
auto poLayerDefn = GetLayerDefn();
if (!bGeomTypeSet)
{
bGeomTypeSet = TRUE;
GetLayerDefn()->SetGeomType(poGeom->getGeometryType());
whileUnsealing(poLayerDefn)
->SetGeomType(poGeom->getGeometryType());
}
else if (GetLayerDefn()->GetGeomType() != poGeom->getGeometryType())
else if (poLayerDefn->GetGeomType() != poGeom->getGeometryType())
{
bGeomTypeMixed = TRUE;
GetLayerDefn()->SetGeomType(wkbUnknown);
whileUnsealing(poLayerDefn)->SetGeomType(wkbUnknown);
}
}
ICreateFeature(poFeature);
Expand Down

0 comments on commit e0b1f9d

Please sign in to comment.