diff --git a/dspace-api/src/main/java/org/dspace/discovery/IndexEventConsumer.java b/dspace-api/src/main/java/org/dspace/discovery/IndexEventConsumer.java index 7c50865970..5f1f8b0b0e 100644 --- a/dspace-api/src/main/java/org/dspace/discovery/IndexEventConsumer.java +++ b/dspace-api/src/main/java/org/dspace/discovery/IndexEventConsumer.java @@ -160,7 +160,8 @@ public class IndexEventConsumer implements Consumer { // If the event subject is a Collection and the event object is an Item, // also update the object in order to index mapped/unmapped Items - if (subject.getType() == Constants.COLLECTION && object.getType() == Constants.ITEM) { + if (subject != null && + subject.getType() == Constants.COLLECTION && object.getType() == Constants.ITEM) { objectsToUpdate.addAll(indexObjectServiceFactory.getIndexableObjects(ctx, object)); } }