Skip to content

Commit

Permalink
Fix metadata crash caused by failed move from const.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Oct 3, 2024
1 parent b1b0368 commit d9dffcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/CesiumRuntime/Private/CesiumGltfComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2242,8 +2242,8 @@ loadModelAnyThreadPart(

return CesiumGltfTextures::createInWorkerThread(asyncSystem, *options.pModel)
.thenInWorkerThread(
[transform, ellipsoid, options = std::move(options)]()
-> UCesiumGltfComponent::CreateOffGameThreadResult {
[transform, ellipsoid, options = std::move(options)]() mutable
-> UCesiumGltfComponent::CreateOffGameThreadResult {
auto pHalf = MakeUnique<HalfConstructedReal>();

loadModelMetadata(pHalf->loadModelResult, options);
Expand Down
4 changes: 4 additions & 0 deletions Source/CesiumRuntime/Private/CreateGltfOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ struct CreateModelOptions {
tileLoadResult(std::move(other.tileLoadResult)) {
pModel = std::get_if<CesiumGltf::Model>(&this->tileLoadResult.contentKind);
}

CreateModelOptions(const CreateModelOptions&) = delete;
CreateModelOptions& operator=(const CreateModelOptions&) = delete;
CreateModelOptions& operator=(CreateModelOptions&&) = delete;
};

struct CreateNodeOptions {
Expand Down

0 comments on commit d9dffcd

Please sign in to comment.