Fix crash when trying to replace .mat video when its currently playing

This commit is contained in:
Caeden Statia 2020-02-22 18:50:44 -08:00
parent f0e68fdd61
commit 35b995e6f0

View file

@ -296,7 +296,7 @@ namespace ModAssistant
{
//Check to see if the lengths of each file are different. If they are, overwrite what currently exists.
FileInfo existingInfo = new FileInfo($"{ThemeDirectory}\\{name}\\_{name}.mp4");
if (existingInfo.Length != file.Length)
if (existingInfo.Length != file.Length && LoadedTheme != name)
{
file.ExtractToFile($"{ThemeDirectory}\\{name}\\_{name}.mp4", true);
}