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 9, 2024
1 parent a00cedb commit 9a7c95e
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 9a7c95e

Please sign in to comment.