Make TJCompressor.close() and TJDecompressor.close() idempotent

git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1415 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-11-18 21:45:02 +00:00
parent f7067a9e73
commit 60ba1963fe
3 changed files with 11 additions and 2 deletions

View File

@@ -567,7 +567,8 @@ public class TJCompressor {
* Free the native structures associated with this compressor instance.
*/
public void close() throws Exception {
destroy();
if (handle != 0)
destroy();
}
protected void finalize() throws Throwable {