fix: material sandbox scene crashes during shutdown (#9325)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user