imagequant: fix panic
This commit is contained in:
parent
0f93198ae1
commit
f553c537b4
4
Image.go
4
Image.go
@ -38,7 +38,9 @@ func (this *Image) Release() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *Image) Quantize(attr *Attributes) (*Result, error) {
|
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)
|
liqerr := C.liq_image_quantize(this.p, attr.p, &res.p)
|
||||||
if liqerr != C.LIQ_OK {
|
if liqerr != C.LIQ_OK {
|
||||||
return nil, translateError(liqerr)
|
return nil, translateError(liqerr)
|
||||||
|
Loading…
Reference in New Issue
Block a user