Fixed potential NPE in WorkflowService when the user that initiated a workflow has been deleted from the system.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21912 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2010-08-20 16:13:40 +00:00
parent a22fdceccd
commit c9edde9a84

View File

@@ -1028,10 +1028,8 @@ public class WorkflowServiceImpl implements WorkflowService
NodeRef initiatorRef = task.getPath().getInstance().getInitiator();
if (initiator != null)
if (initiatorRef != null && this.nodeService.exists(initiatorRef))
{
// TODO: deal with missing users!
initiator = (String)this.nodeService.getProperty(initiatorRef, ContentModel.PROP_USERNAME);
}