mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-07 23:08:47 -05:00
Ensure template is non-null
template folder not existing returned null
This commit is contained in:
@@ -697,10 +697,10 @@ private static void StoreLegalSaveGameData(SaveFile sav)
|
||||
|
||||
private static PKM LoadTemplate(SaveFile sav)
|
||||
{
|
||||
if (!Directory.Exists(TemplatePath))
|
||||
return null;
|
||||
|
||||
var blank = sav.BlankPKM;
|
||||
if (!Directory.Exists(TemplatePath))
|
||||
return blank;
|
||||
|
||||
var di = new DirectoryInfo(TemplatePath);
|
||||
string path = Path.Combine(TemplatePath, $"{di.Name}.{blank.Extension}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user