Skip to content

Commit

Permalink
fix: check fileResource null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tokland committed Dec 12, 2024
1 parent 74fb692 commit 58f10e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public void process(Event event, WorkContext ctx) {
if (dataElement.isFileType()) {
FileResource fileResource = fileResourceService.getFileResource(dataValue.getValue());

if (!fileResource.isAssigned() || fileResource.getFileResourceOwner() == null) {
if (fileResource != null
&& (!fileResource.isAssigned() || fileResource.getFileResourceOwner() == null)) {
fileResource.setAssigned(true);
fileResource.setFileResourceOwner(event.getEvent());
fileResourceService.updateFileResource(fileResource);
Expand Down

0 comments on commit 58f10e3

Please sign in to comment.