Skip to content

Commit 659d22e

Browse files
committed
Fixed possible null warning.
1 parent 5fe21ea commit 659d22e

File tree

1 file changed

+1
-1
lines changed
  • Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor

1 file changed

+1
-1
lines changed

Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor/Git.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public static void DiscardChanges(string path)
140140
CreateNoWindow = true
141141
});
142142
143-
if (process.StandardError.ReadLine().StartsWith("error: pathspec"))
143+
if (process?.StandardError.ReadLine() is string line && line.StartsWith("error: pathspec"))
144144
{
145145

146146
Debug.LogError("File not tracked by git.");

0 commit comments

Comments
 (0)