Skip to content
Permalink
Browse files

GMLAS: avoid null pointer dereference on some schemas

  • Loading branch information...
rouault committed Apr 14, 2019
1 parent a9f32fb commit c0856bd3877de26ba25aa5f4c71c7f5b845ea159
Showing with 15 additions and 11 deletions.
  1. +15 −11 gdal/ogr/ogrsf_frmts/gmlas/ogrgmlasschemaanalyzer.cpp
@@ -1002,17 +1002,21 @@ bool GMLASSchemaAnalyzer::Analyze(GMLASXSDCache& oCache,
{
bool bSimpleEnoughOut = true;
int nSubCountSubEltOut = 0;
FindElementsWithMustBeToLevel(
osXPath,
poCT->getParticle()->getModelGroupTerm(),
0,
oSetVisitedEltDecl,
oSetVisitedModelGroups,
oVectorEltsForTopClass,
aoSetXPathEltsForTopClass,
poModel,
bSimpleEnoughOut,
nSubCountSubEltOut );
auto poParticle = poCT->getParticle();
if( poParticle )
{
FindElementsWithMustBeToLevel(
osXPath,
poParticle->getModelGroupTerm(),
0,
oSetVisitedEltDecl,
oSetVisitedModelGroups,
oVectorEltsForTopClass,
aoSetXPathEltsForTopClass,
poModel,
bSimpleEnoughOut,
nSubCountSubEltOut );
}
}
}
}

0 comments on commit c0856bd

Please sign in to comment.
You can’t perform that action at this time.