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

Prevent material double free then crash #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidgarciaanton
Copy link
Contributor

Prevent Double Free Crash

ViewNode2 was freeing material by it's own, also didMaterialLoader when exiting composition. Given that situation a crash was happening when using a Scene that uses ViewNode2 renderables.

The fix

To fix that the MaterialLoader tracks it's allocated materials, and the ViewNode2 destroy the material through the MaterialLoader instead of deleting the instance directly from the Engine

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.

1 participant