diff --git a/Touhou Launcher/MainForm.cs b/Touhou Launcher/MainForm.cs index 1157038..967cf02 100644 --- a/Touhou Launcher/MainForm.cs +++ b/Touhou Launcher/MainForm.cs @@ -996,7 +996,7 @@ private void Dir_LostFocus(object sender, EventArgs e) { ((TextBox)sender).BackColor = SystemColors.Window; curCfg.np2Dir = np2Dir.Text; - string crapPath = Path.GetDirectoryName(crapDir.Text); + string crapPath = crapDir.Text == "" ? "" : Path.GetDirectoryName(crapDir.Text); curCfg.crapDir = Directory.Exists(crapPath + "\\bin") ? crapPath : crapPath.TrimEnd("\\bin".ToCharArray()); curCfg.StartingRepo = crapStartingRepo.Text; }