mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Merge pull request #12667 from peppy/fix-editor-threading-failure
Remove unsafe access to Composer.HitObjects
This commit is contained in:
commit
f2f41545f8
@ -34,13 +34,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
// For non-pooled rulesets, hitobjects are already present in the playfield which allows the blueprints to be loaded in the async context.
|
|
||||||
if (Composer != null)
|
|
||||||
{
|
|
||||||
foreach (var obj in Composer.HitObjects)
|
|
||||||
AddBlueprintFor(obj.HitObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
selectedHitObjects.BindTo(Beatmap.SelectedHitObjects);
|
selectedHitObjects.BindTo(Beatmap.SelectedHitObjects);
|
||||||
selectedHitObjects.CollectionChanged += (selectedObjects, args) =>
|
selectedHitObjects.CollectionChanged += (selectedObjects, args) =>
|
||||||
{
|
{
|
||||||
@ -69,7 +62,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
if (Composer != null)
|
if (Composer != null)
|
||||||
{
|
{
|
||||||
// For pooled rulesets, blueprints must be added for hitobjects already "current" as they would've not been "current" during the async load addition process above.
|
|
||||||
foreach (var obj in Composer.HitObjects)
|
foreach (var obj in Composer.HitObjects)
|
||||||
AddBlueprintFor(obj.HitObject);
|
AddBlueprintFor(obj.HitObject);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user