Skip to content

Commit 92a47a7

Browse files
authored
Merge pull request #1021 from MartinBuehlmann/bugfixActionMessage
Fix NullReferenceException in ActionMessage when EnableGuardDuringInvocation is enabled
2 parents 4d4a98d + ab58668 commit 92a47a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Caliburn.Micro.Platform/ActionMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ protected override void Invoke(object eventArgs)
416416

417417
_context.EventArgs = eventArgs;
418418

419-
if (EnforceGuardsDuringInvocation && (_context?.CanExecute() != true))
419+
if (EnforceGuardsDuringInvocation && _context.CanExecute != null && !_context.CanExecute())
420420
{
421421
return;
422422
}

0 commit comments

Comments
 (0)