Skip to content

Commit

Permalink
Add proper error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
soopercool101 committed Jan 6, 2020
1 parent 478770b commit d5d2ec5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BrawlCrate/BrawlManagers/CostumeManager/CostumeManagerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ public void updateCostumeSelectionPane()
if (charname != "-")
{
int charNum = pmap.CharBustTexFor(charname);
DirectoryInfo dir = new DirectoryInfo(Path.Combine(CurrentDirectory, "fighter", charname));
if (!dir.Exists)
{
return;
}
foreach (FileInfo f in new DirectoryInfo(Path.Combine(CurrentDirectory, "fighter", charname))
.GetFiles().Where(o =>
o.Extension.Equals(".pac", StringComparison.OrdinalIgnoreCase) ||
Expand Down

0 comments on commit d5d2ec5

Please sign in to comment.