make selecting user shaders not crash with the default empty string path
Path.GetDirectoryName throws if it is handed an empty string apparently
This commit is contained in:
parent
a680739c6e
commit
8d5f7b5478
|
@ -270,7 +270,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var result = this.ShowFileOpenDialog(
|
||||
filter: CgShaderPresetsFSFilterSet,
|
||||
initDir: Path.GetDirectoryName(_pathSelection)!,
|
||||
initDir: string.IsNullOrWhiteSpace(_pathSelection)
|
||||
? string.Empty : Path.GetDirectoryName(_pathSelection)!,
|
||||
initFileName: _pathSelection);
|
||||
if (result is null) return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue