mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-06 18:29:06 +02:00
Merge pull request #13880 from SamGondelman/matCrash
Fix crash on shutdown in domain with material
This commit is contained in:
commit
89bd24dd54
1 changed files with 8 additions and 0 deletions
|
@ -1841,6 +1841,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
});
|
});
|
||||||
|
|
||||||
EntityTree::setAddMaterialToEntityOperator([this](const QUuid& entityID, graphics::MaterialLayer material, const std::string& parentMaterialName) {
|
EntityTree::setAddMaterialToEntityOperator([this](const QUuid& entityID, graphics::MaterialLayer material, const std::string& parentMaterialName) {
|
||||||
|
if (_aboutToQuit) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// try to find the renderable
|
// try to find the renderable
|
||||||
auto renderable = getEntities()->renderableForEntityId(entityID);
|
auto renderable = getEntities()->renderableForEntityId(entityID);
|
||||||
if (renderable) {
|
if (renderable) {
|
||||||
|
@ -1856,6 +1860,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
EntityTree::setRemoveMaterialFromEntityOperator([this](const QUuid& entityID, graphics::MaterialPointer material, const std::string& parentMaterialName) {
|
EntityTree::setRemoveMaterialFromEntityOperator([this](const QUuid& entityID, graphics::MaterialPointer material, const std::string& parentMaterialName) {
|
||||||
|
if (_aboutToQuit) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// try to find the renderable
|
// try to find the renderable
|
||||||
auto renderable = getEntities()->renderableForEntityId(entityID);
|
auto renderable = getEntities()->renderableForEntityId(entityID);
|
||||||
if (renderable) {
|
if (renderable) {
|
||||||
|
|
Loading…
Reference in a new issue