Skip to content

Commit 73f1132

Browse files
Avoid NullReferenceException by checking for null or empty key first (#1125)
1 parent e0ccc15 commit 73f1132

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Model/URLRouter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class URLRouter
2020
internal static string GetURLRoute(string key, object[] objectParms, string[] parmsName, string scriptPath)
2121
{
2222
string[] parms = objectParms.Select(p => StringizeParm(p)).ToArray();
23-
if (PathUtil.IsAbsoluteUrl(key) || key.StartsWith("/") || string.IsNullOrEmpty(key) || scheme.IsMatch(key))
23+
if (string.IsNullOrEmpty(key) || PathUtil.IsAbsoluteUrl(key) || key.StartsWith("/") || scheme.IsMatch(key))
2424
{
2525
if (parms.Length > 0)
2626
{

0 commit comments

Comments
 (0)