--- ogr/ogrsf_frmts/ili/ogrili2layer.cpp 2006-06-08 10:40:06.804746888 +0200 +++ ogr/ogrsf_frmts/ili/ogrili2layer.cpp 2006-06-08 10:35:53.648232528 +0200 @@ -73,7 +76,6 @@ poFeatureDefn->SetGeomType( eReqType ); bWriter = bWriterIn; - listFeatureIt = 0; } /************************************************************************/ @@ -116,6 +118,7 @@ OGRErr OGRILI2Layer::SetFeature (OGRFeature *poFeature) { listFeature.push_back(poFeature); + if (listFeature.size() == 1) ResetReading(); return OGRERR_NONE; } @@ -132,7 +135,6 @@ /************************************************************************/ OGRFeature *OGRILI2Layer::GetNextFeature() { - if (listFeatureIt == 0) listFeatureIt = listFeature.begin(); if (listFeatureIt != listFeature.end()) return *(listFeatureIt++); return NULL;