From dd7a1054b0fed34a5d1779349f01fa2b415f2d7b Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sun, 24 Oct 2021 13:20:46 +0200 Subject: [PATCH] Fixed null case. --- src/fr/devinsy/statoolinfos/io/ODSFile.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/io/ODSFile.java b/src/fr/devinsy/statoolinfos/io/ODSFile.java index 6366a10..3c431bb 100644 --- a/src/fr/devinsy/statoolinfos/io/ODSFile.java +++ b/src/fr/devinsy/statoolinfos/io/ODSFile.java @@ -60,7 +60,10 @@ public class ODSFile } finally { - out.close(); + if (out != null) + { + out.close(); + } } } @@ -82,7 +85,10 @@ public class ODSFile } finally { - out.close(); + if (out != null) + { + out.close(); + } } } }