From 671270ce4007bf7ca865def421e92c298ec45223 Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 1 Oct 2024 16:13:21 +0000 Subject: [PATCH] Fix NPE --- app/src/main/java/io/xpipe/app/util/ScanDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/ScanDialog.java b/app/src/main/java/io/xpipe/app/util/ScanDialog.java index fb28ea03a..7de23c25c 100644 --- a/app/src/main/java/io/xpipe/app/util/ScanDialog.java +++ b/app/src/main/java/io/xpipe/app/util/ScanDialog.java @@ -94,8 +94,10 @@ class ScanDialog extends DialogComp { } }); } finally { - shellValidationContext.close(); - shellValidationContext = null; + if (shellValidationContext != null) { + shellValidationContext.close(); + shellValidationContext = null; + } } }); }