Skip to content

Commit 5741b63

Browse files
committed
Resolve Rollbar# 33001
1 parent b3b1e29 commit 5741b63

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

VoiceAttackResponder/VoiceAttackVariables.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,8 @@ internal static void updateConfigurationValues ( object sender, PropertyChangedE
215215
if ( e.PropertyName.Equals( nameof( ShipMonitorConfiguration ), StringComparison.InvariantCultureIgnoreCase ) )
216216
{
217217
setShipValues( ResolveCurrentShip(), "Ship" );
218-
Task.Run( () =>
219-
{
220-
var shipConfig = configService.shipMonitorConfiguration;
221-
setShipyardValues( shipConfig.shipyard?.ToList() );
222-
} );
218+
var shipyardSnapshot = configService.shipMonitorConfiguration.shipyard?.ToList();
219+
setShipyardValues( shipyardSnapshot );
223220
return;
224221
}
225222

@@ -1125,7 +1122,8 @@ private static void RunWithRuntimeActionBatch ( Action action, bool forceDispatc
11251122

11261123
if ( batch.Actions.Count > 0 )
11271124
{
1128-
DispatchRuntimeActions( batch.Actions, forceDispatch );
1125+
var actionsSnapshot = batch.Actions.ToArray();
1126+
DispatchRuntimeActions( actionsSnapshot, forceDispatch );
11291127
}
11301128
}
11311129
}

0 commit comments

Comments
 (0)