Skip to content

Commit

Permalink
Pass exception back to user
Browse files Browse the repository at this point in the history
 - check object is not null before closing
 - refs #1160
  • Loading branch information
iBotPeaches committed May 5, 2017
1 parent 7947f11 commit e2f77aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ public void decode() throws AndrolibException, IOException, DirectoryException {
mAndrolib.recordUncompressedFiles(mApkFile, mUncompressedFiles);
mAndrolib.writeOriginalFiles(mApkFile, outDir);
writeMetaFile();
} catch (Exception ex) {
throw ex;
} finally {
try {
mApkFile.close();
Expand Down
4 changes: 3 additions & 1 deletion brut.j.dir/src/main/java/brut/directory/ExtFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public Directory getDirectory() throws DirectoryException {
}

public void close() throws IOException {
mDirectory.close();
if (mDirectory != null) {
mDirectory.close();
}
}

private Directory mDirectory;
Expand Down

0 comments on commit e2f77aa

Please sign in to comment.