fix: material sandbox scene crashes during shutdown (#9325)

This commit is contained in:
Doris Wu
2025-10-15 23:34:50 +08:00
committed by GitHub
parent 49c4a5d62c
commit 06c4ed4e6b

View File

@@ -191,6 +191,8 @@ static int handleCommandLineArgments(int argc, char* argv[], Config* config) {
}
static void cleanup(Engine* engine, View*, Scene*) {
g_meshSet.reset(nullptr);
for (const auto& material : g_meshMaterialInstances) {
engine->destroy(material.second);
}
@@ -203,8 +205,6 @@ static void cleanup(Engine* engine, View*, Scene*) {
engine->destroy(i);
}
g_meshSet.reset(nullptr);
engine->destroy(g_params.light);
engine->destroy(g_params.spotLight);
engine->destroy(g_colorGrading);