Skip to content

Commit b8fd312

Browse files
committed
fix crash if modifications name empty
1 parent c346592 commit b8fd312

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

FlashpointSecurePlayer/FlashpointSecurePlayer.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ private async Task ActivateModificationsAsync(string commandLine, ErrorDelegate
122122
modificationsElement = GetModificationsElement(false, ModificationsName);
123123
} catch (System.Configuration.ConfigurationErrorsException) {
124124
errorDelegate(Properties.Resources.ConfigurationFailedLoad);
125+
// we really need modificationsElement to exist
126+
throw new InvalidModificationException();
127+
}
128+
129+
if (modificationsElement == null) {
130+
errorDelegate(Properties.Resources.ConfigurationFailedLoad);
131+
throw new InvalidModificationException();
125132
}
126133

127134
if (DownloadsBeforeModificationNames == null) {

0 commit comments

Comments
 (0)