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

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1420 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-11-21 15:35:33 +00:00
parent ea3df2f662
commit 10c3e5d44e
3 changed files with 12 additions and 3 deletions

View File

@@ -496,7 +496,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 {