diff --git a/src/geometry.rs b/src/geometry.rs index 0fb86c6..cc14550 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -2009,7 +2009,7 @@ impl$(<$lt>)? Geom for $ty_name$(<$lt>)? { fn get_num_geometries(&self) -> GResult { unsafe { let ret = GEOSGetNumGeometries_r(self.get_raw_context(), self.as_raw()); - if ret < 1 { + if ret == -1 { Err(Error::GenericError("GEOSGetNumGeometries_r failed".to_owned())) } else { Ok(ret as _)