Skip to content

Commit 6d9bae5

Browse files
committed
KN-6749 Null reference exception when redirect is used in OnActionExecuting method of controller
1 parent 163cab4 commit 6d9bae5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DevTrends.MvcDonutCaching/DonutOutputCacheAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ public override void OnActionExecuting(ActionExecutingContext filterContext)
100100

101101
public override void OnResultExecuted(ResultExecutedContext filterContext)
102102
{
103+
if(_cacheSettings == null)
104+
return;
105+
103106
ExecuteCallback(filterContext, false);
104107

105108
if (!filterContext.IsChildAction)

0 commit comments

Comments
 (0)