From fd1c1bc67a0308913bedf880edb0ab74e6678fc1 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Thu, 20 Sep 2018 23:37:00 -0400 Subject: [PATCH] check for null --- .../autopsy/imagegallery/datamodel/grouping/GroupKey.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupKey.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupKey.java index ae2d2361e6..00d3c3d728 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupKey.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupKey.java @@ -74,7 +74,8 @@ public class GroupKey> implements Comparable hash = 79 * hash + Objects.hashCode(this.val); hash = 79 * hash + Objects.hashCode(this.attr); - hash = 79 * hash + (int)this.dataSource.getId(); + if (this.dataSource != null) + hash = 79 * hash + (int)this.dataSource.getId(); return hash; }