Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential null reference in skin editor if target screen is null (during exit) #18586

Merged
merged 2 commits into from Jun 6, 2022

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Jun 6, 2022

[runtime] 2022-06-06 09:24:31 [verbose]: Host execution state changed to Stopping
[runtime] 2022-06-06 09:24:31 [error]: An unhandled error has occurred.
[runtime] 2022-06-06 09:24:31 [error]: System.NullReferenceException: Object reference not set to an instance of an object.
[runtime] 2022-06-06 09:24:31 [error]: at osu.Game.Skinning.Editor.SkinEditorOverlay.setTarget(OsuScreen target) in
/Users/dean/Projects/osu/osu.Game/Skinning/Editor/SkinEditorOverlay.cs:line 173
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Threading.Scheduler.Update()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Graphics.Drawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()

…(during exit)

```csharp
[runtime] 2022-06-06 09:24:31 [verbose]: Host execution state changed to
Stopping
[runtime] 2022-06-06 09:24:31 [error]: An unhandled error has occurred.
[runtime] 2022-06-06 09:24:31 [error]: System.NullReferenceException:
Object reference not set to an instance of an object.
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Game.Skinning.Editor.SkinEditorOverlay.setTarget(OsuScreen target)
in
/Users/dean/Projects/osu/osu.Game/Skinning/Editor/SkinEditorOverlay.cs:line
173
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Threading.Scheduler.Update()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Graphics.Drawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
[runtime] 2022-06-06 09:24:31 [error]: at
osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
```
@ppy-sentryintegration
Copy link

Sentry issue: OSU-CN

@bdach bdach enabled auto-merge June 6, 2022 19:49
@bdach bdach merged commit 45d82d2 into ppy:master Jun 6, 2022
@peppy peppy deleted the skin-editor-null-ref-on-game-exit branch June 7, 2022 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants