Skip to content

Commit 83f7ed8

Browse files
committed
add null check to GetValidArgument
1 parent 92bed7b commit 83f7ed8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

FlashpointSecurePlayer/Shared.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,6 +2971,10 @@ public static string[] GetCommandLineToArgv(string commandLine, out int argc) {
29712971

29722972
// http://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
29732973
public static string GetValidArgument(string argument, bool force = false) {
2974+
if (argument == null) {
2975+
argument = String.Empty;
2976+
}
2977+
29742978
if (!force && argument != String.Empty && argument.IndexOfAny(new char[]{ ' ', '\t', '\n', '\v', '\"' }) == -1) {
29752979
return argument;
29762980
}

0 commit comments

Comments
 (0)