From 9949b77dd184c23e2cd0a8399cf694c91c259cfc Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 14:20:34 -0500 Subject: [PATCH] Fixes an NPE in the previous commit. --- .../org/sleuthkit/autopsy/contentviewers/PListViewer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java index ff31273dd6..c488c93be8 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java @@ -482,9 +482,11 @@ public class PListViewer extends javax.swing.JPanel implements FileTypeViewer, E } void setChildren(final PropKeyValue... children) { - this.children = Arrays.stream(children) - .map(child -> new PropKeyValue(child)) - .toArray(PropKeyValue[]::new); + if (children != null) { + this.children = Arrays.stream(children) + .map(child -> new PropKeyValue(child)) + .toArray(PropKeyValue[]::new); + } } }