Skip to content

Commit 453d464

Browse files
committed
Check for null condition
1 parent 500a8e0 commit 453d464

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Source/Boxed.AspNetCore/WebHostBuilderExtensions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ public static IWebHostBuilder UseIf(
5757
throw new ArgumentNullException(nameof(hostBuilder));
5858
}
5959

60+
if (condition == null)
61+
{
62+
throw new ArgumentNullException(nameof(condition));
63+
}
64+
6065
if (action == null)
6166
{
6267
throw new ArgumentNullException(nameof(action));
@@ -136,6 +141,11 @@ public static IWebHostBuilder UseIfElse(
136141
throw new ArgumentNullException(nameof(hostBuilder));
137142
}
138143

144+
if (condition == null)
145+
{
146+
throw new ArgumentNullException(nameof(condition));
147+
}
148+
139149
if (ifAction == null)
140150
{
141151
throw new ArgumentNullException(nameof(ifAction));

0 commit comments

Comments
 (0)