diff --git a/algorithms.go b/algorithms.go index c8ce1ec..bd2468a 100644 --- a/algorithms.go +++ b/algorithms.go @@ -309,7 +309,7 @@ func (src RasterBand) ContourGenerate( fixedLevels_p = (*C.double)(unsafe.Pointer(&fixedLevels[0])) } - return CPLErr(C.GDALContourGenerate( + cErr := C.GDALContourGenerate( src.cval, C.double(interval), C.double(base), @@ -322,7 +322,8 @@ func (src RasterBand) ContourGenerate( C.int(elevationFieldIndex), C.goGDALProgressFuncProxyB(), unsafe.Pointer(arg), - )).Err() + ) + return CPLErrContainer{ErrVal: cErr}.Err() } /* --------------------------------------------- */