Merge pull request #92 from h2non/develop

Version 1.0.1
master
Tomás Aparicio 10 years ago committed by GitHub
commit 66f3ccc217

@ -1,3 +1,7 @@
## 1.0.1 / 22-06-2016
- fix(#90): Do not not dereference the original image a second time.
## 1.0.0 / 21-04-2016
- refactor(api): breaking changes: normalize public members to follow Go naming idioms.

@ -1,4 +1,4 @@
package bimg
// Version represents the current package semantic version.
const Version = "1.0.0"
const Version = "1.0.1"

@ -318,9 +318,12 @@ func vipsSave(image *C.VipsImage, o vipsSaveOptions) ([]byte, error) {
if err != nil {
return nil, err
}
//When an image has an unsupported color space, vipsPreSave returns the pointer of the image passed to it unmodified.
//When this occurs, we must take care to not dereference the original image a second time;
//we may otherwise erroneously free the object twice
// When an image has an unsupported color space, vipsPreSave
// returns the pointer of the image passed to it unmodified.
// When this occurs, we must take care to not dereference the
// original image a second time; we may otherwise erroneously
// free the object twice.
if tmpImage != image {
defer C.g_object_unref(C.gpointer(tmpImage))
}

Loading…
Cancel
Save