From 2d3dcc43e8f84bb49430f70f4005f099c78955ef Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 14 May 2020 09:55:23 -0400 Subject: [PATCH] defensive code --- .../centralrepository/eventlisteners/CaseEventListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java index 507a9e8112..cbd136b31c 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java @@ -374,7 +374,7 @@ final class CaseEventListener implements PropertyChangeListener { private void handleTagAdded(BlackBoardArtifactTagAddedEvent evt) { // ensure tag added event has a valid content id - if (evt.getAddedTag() == null || evt.getAddedTag().getContent() == null) { + if (evt.getAddedTag() == null || evt.getAddedTag().getContent() == null || evt.getAddedTag().getArtifact() == null) { LOGGER.log(Level.SEVERE, String.format("ContentTagAddedEvent %s did not have valid content to provide a content id.", evt)); return; @@ -440,7 +440,6 @@ final class CaseEventListener implements PropertyChangeListener { private void setArtifactKnownStatus(BlackboardArtifact bbArtifact, TskData.FileKnown knownStatus) { List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact); for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) { - eamArtifact.setComment(""); try { dbManager.setAttributeInstanceKnownStatus(eamArtifact, knownStatus); } catch (CentralRepoException ex) {