From 6f889a14da684e70d023e1725ebd531dc66909b6 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Tue, 11 Jun 2019 17:11:14 +0600 Subject: [PATCH] Fix segfault on watermark applying --- vips.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vips.go b/vips.go index 1d577f7b..f3082f56 100644 --- a/vips.go +++ b/vips.go @@ -631,7 +631,7 @@ func (img *vipsImage) ApplyWatermark(opts *watermarkOptions) error { wm *vipsImage tmp *C.VipsImage ) - defer wm.Clear() + defer func() { wm.Clear() }() var err error