Skip to content

Commit

Permalink
Correct size of sampleSuccess array when tileset not created.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 27, 2024
1 parent ba47a22 commit c66231a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion native~/Runtime/src/Cesium3DTilesetImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,15 @@ Cesium3DTilesetImpl::SampleHeightMostDetailed(
position.z));
}

size_t count = positions.size();

CesiumAsync::Future<SampleHeightResult> future =
this->getTileset()
? this->getTileset()->sampleHeightMostDetailed(positions)
: getAsyncSystem().createResolvedFuture(
Cesium3DTilesSelection::SampleHeightResult{
std::move(positions),
std::vector<bool>(positions.size(), false),
std::vector<bool>(count, false),
{"Could not sample heights from tileset because it has not "
"been created."}});

Expand Down

0 comments on commit c66231a

Please sign in to comment.