imagequant: fix panic

This commit is contained in:
mappu 2016-11-24 20:53:26 +13:00
parent 0f93198ae1
commit f553c537b4

View File

@ -38,7 +38,9 @@ func (this *Image) Release() {
}
func (this *Image) Quantize(attr *Attributes) (*Result, error) {
res := Result{}
res := Result{
im: this,
}
liqerr := C.liq_image_quantize(this.p, attr.p, &res.p)
if liqerr != C.LIQ_OK {
return nil, translateError(liqerr)