Skip to content

Commit

Permalink
Merge pull request #672 from CesiumGS/fix-scene-reload-crash
Browse files Browse the repository at this point in the history
Fix crash on scene reload
  • Loading branch information
lilleyse authored Feb 12, 2024
2 parents 6d7dcf4 + 76216a2 commit 7ecb0c6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Added support for globe anchors on non-georeferenced tilesets.
* Fixed zooming to tileset extents when tileset prims have non identity transformation.
* Fixed crash when updating tilesets shader inputs.
* Fixed crash when setting certain `/Cesium` debug options at runtime.

### v0.17.0 - 2024-02-01

Expand Down
21 changes: 14 additions & 7 deletions src/core/src/FabricMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,20 @@ FabricMaterial::FabricMaterial(
}

FabricMaterial::~FabricMaterial() {
if (stageDestroyed()) {
return;
}

for (const auto& path : _allPaths) {
FabricUtil::destroyPrim(_pContext->getFabricStage(), path);
}
// The code below is temporarily commented out to avoid a crash.
// It will cause a leak, but since this only happens when materials
// pools are destroyed (which doesn't happen during normal usage) it
// shouldn't be a huge concern.
//
// See https://github.com/CesiumGS/cesium-omniverse/issues/444 for details.

// if (stageDestroyed()) {
// return;
// }

// for (const auto& path : _allPaths) {
// FabricUtil::destroyPrim(_pContext->getFabricStage(), path);
// }
}

void FabricMaterial::setActive(bool active) {
Expand Down

0 comments on commit 7ecb0c6

Please sign in to comment.