Skip to content

Prevent crash when modifying the shape before _ready()#200

Merged
limbonaut merged 1 commit intoSirRamEsq:masterfrom
mphe:fix_197
Oct 27, 2025
Merged

Prevent crash when modifying the shape before _ready()#200
limbonaut merged 1 commit intoSirRamEsq:masterfrom
mphe:fix_197

Conversation

@mphe
Copy link
Collaborator

@mphe mphe commented Oct 26, 2025

Merge this after #199.

Shapes becomes dirty upon scene load. The dirty update is called deferred, so _ready() already ran.
This does not seem to be the case when calling
get_tree().reload_current_scene(). For whatever reason, the deferred _on_dirty_update call already runs before the node was added to the scene.

This patch prevents dirty updates before the shape is ready.

Closes #197

Shapes becomes dirty upon scene load. The dirty update is called
deferred, so `_ready()` already ran.
This does not seem to be the case when calling
`get_tree().reload_current_scene()`. For whatever reason, the deferred
`_on_dirty_update` call already runs before the node was added to the
scene.

This patch prevents dirty updates before the shape is ready.

Closes SirRamEsq#197
@mphe mphe requested a review from limbonaut October 26, 2025 18:09
@limbonaut limbonaut merged commit 0cb1a65 into SirRamEsq:master Oct 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game crashes when reloading current scene

2 participants