Skip to content

Conversation

@vincentfretin
Copy link
Contributor

Description:

Fix crash setting transform on undefined when layer is destroyed in updateSrc and layer is not yet recreated because image has not loaded yet (this.texture is undefined).
Crash reproduced on the Comic book example while in VR switch to the next image. I didn't have the issue on the other layer quad example.
In a592737 I had changed updateSrc to destroy the layer on src change, not sure if I tested again that example after that change or the issue appears now because of my connection, anyway this PR fixes it.

Changes proposed:

  • if this.layer is undefined after initLayer, return
…pdateSrc and layer is not yet recreated because image has not loaded yet
@dmarcos dmarcos merged commit 147adb2 into aframevr:master Dec 15, 2025
1 check passed
@dmarcos
Copy link
Member

dmarcos commented Dec 15, 2025

thank you!

@vincentfretin vincentfretin deleted the fix-layer-recreation branch December 15, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants