Clean up PNG and JPEG encoding properly
This commit is contained in:
@@ -487,6 +487,8 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
jpeg_destroy_compress (&cinfo);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@@ -237,6 +237,8 @@ namespace lime {
|
||||
|
||||
if (!info_ptr) {
|
||||
|
||||
png_destroy_write_struct (&png_ptr, NULL);
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
@@ -310,6 +312,8 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
png_destroy_write_struct (&png_ptr, &info_ptr);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user