From e36d6f83e9e5f4f1bd794ae6defe34e5aa223afe Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 May 2024 11:33:03 -0400 Subject: [PATCH] fix for NPE --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 50dcca3f6f..221acc3e68 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -2823,11 +2823,14 @@ public class Case { Throwable curEx = ex; // max depth search for a concurrent db access exception will be 10 for (int i = 0; i < 10; i++) { - if (curEx instanceof ConcurrentDbAccessException foundEx) { + if (curEx == null) { + break; + } else if (curEx instanceof ConcurrentDbAccessException foundEx) { concurrentEx = foundEx; break; + } else { + curEx = curEx.getCause(); } - curEx = curEx.getCause(); } if (concurrentEx != null) {