Skip to content

Commit

Permalink
Merge pull request lukeroth#36 from aviyu/master
Browse files Browse the repository at this point in the history
NextFeature support nil
  • Loading branch information
byteplane authored Mar 7, 2019
2 parents 9a24b2f + e962d09 commit ac78d15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ogr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,12 @@ func (layer Layer) ResetReading() {
}

// Fetch the next available feature from this layer
func (layer Layer) NextFeature() Feature {
func (layer Layer) NextFeature() *Feature {
feature := C.OGR_L_GetNextFeature(layer.cval)
return Feature{feature}
if feature == nil {
return nil
}
return &Feature{feature}
}

// Move read cursor to the provided index
Expand Down

0 comments on commit ac78d15

Please sign in to comment.