Check for nulls when looking for ipc.txt

This commit is contained in:
Bartłomiej Dach 2020-06-13 17:17:58 +02:00
parent 2cadab8d29
commit eb92c3390d

View File

@ -182,7 +182,7 @@ namespace osu.Game.Tournament.IPC
/// <returns>Whether an IPC directory was successfully auto-detected.</returns>
public bool AutoDetectIPCLocation() => SetIPCLocation(findStablePath());
private static bool ipcFileExistsInDirectory(string p) => File.Exists(Path.Combine(p, "ipc.txt"));
private static bool ipcFileExistsInDirectory(string p) => p != null && File.Exists(Path.Combine(p, "ipc.txt"));
[CanBeNull]
private string findStablePath()