Skip to content

Conversation

CUB3D
Copy link
Contributor

@CUB3D CUB3D commented Sep 21, 2025

If .object on a DisplayObject returns Undefined then MovieClipReference::try_from_stage_object will fail. Create a pure string-path reference in this case rather than panicking.

Fixes #21703

If `.object` on a `DisplayObject` returns `Undefined` then `MovieClipReference::try_from_stage_object` will fail, create a pure string-path reference in this case.

Fixes ruffle-rs#21703
@kjarosh kjarosh added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-fix Type: Bug fix (in something that's supposed to work already) squash-on-merge Marks a PR to be squashed before merging. labels Sep 21, 2025
@kjarosh
Copy link
Member

kjarosh commented Sep 21, 2025

Can we add a test for that? The new path is not covered by tests.

@torokati44
Copy link
Member

Do we really want to block changes to any part of the code base that just happens to not already be covered almost entirely by tests (and the SWF kind specifically, at that)?

@torokati44
Copy link
Member

(Or is the check not meant to "fail" if it could post the comment?)

@kjarosh
Copy link
Member

kjarosh commented Sep 21, 2025

(Or is the check not meant to "fail" if it could post the comment?)

The check is failing only because the comment cannot be posted, the point of the comment was to allow maintainers to assess whether we should add tests or not, and not introduce a hard failure.

In this case the newly added piece of code is untested, and the points from the comment that did not get posted apply :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2) squash-on-merge Marks a PR to be squashed before merging. T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on http://www.mygamesworld.com/game/7279/Cubis_2_-_Morph-Fun.html
3 participants