This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/main by this push:
     new f2b24a5ad TIKA-4475: avoid NPE
f2b24a5ad is described below

commit f2b24a5ad2b27bc1711c5cbbd53bed7d96238db0
Author: Tilman Hausherr <[email protected]>
AuthorDate: Thu Aug 28 14:07:35 2025 +0200

    TIKA-4475: avoid NPE
---
 tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java 
b/tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java
index 0120cac0c..5ee5865fe 100644
--- a/tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java
+++ b/tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java
@@ -212,7 +212,9 @@ public class ProcessUtils {
             if (p != null) {
                 p.destroyForcibly();
             }
-            release(id);
+            if (id != null) {
+                release(id);
+            }
         }
 
     }

Reply via email to