Defensive programming pays off

This commit is contained in:
Rick Falkvinge
2018-04-25 17:11:12 +02:00
parent 83f51abbcf
commit 47b4056804
+1 -1
View File
@@ -194,7 +194,7 @@ namespace Swarmops.Logic.Financial
ExternalBankDataProfile oldProfile = ExternalBankDataProfileOldHack;
ExternalBankDataProfile newProfile = AutomationProfile.BankDataProfile;
if (oldProfile != null && newProfile.Identity != oldProfile.Identity)
if (oldProfile != null && (newProfile.Identity != oldProfile.Identity || newProfile.Name != oldProfile.Name))
{
throw new InvalidOperationException("Defensive programming for crucial part");
}