Skip to content

Commit

Permalink
Merge pull request #1553 from CesiumGS/call-resolves
Browse files Browse the repository at this point in the history
Fix `SampleHeightMostDetailed` crash on `Cesium3DTileset` with raster overlay
  • Loading branch information
kring authored Nov 21, 2024
2 parents 6babafe + e9aea17 commit 2c06e31
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### ? - 2024-12-02

##### Fixes :wrench:

- Fixed a crash that could occur when using `SampleHeightMostDetailed` on a `Cesium3DTileset` with a raster overlay.

### v2.10.0 - 2024-11-01

##### Additions :tada:
Expand Down
6 changes: 6 additions & 0 deletions Source/CesiumRuntime/Private/Cesium3DTileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ void ACesium3DTileset::SetMobility(EComponentMobility::Type NewMobility) {
void ACesium3DTileset::SampleHeightMostDetailed(
const TArray<FVector>& LongitudeLatitudeHeightArray,
FCesiumSampleHeightMostDetailedCallback OnHeightsSampled) {
// It's possible to call this function before a Tick happens, so make sure
// that the necessary variables are resolved.
this->ResolveGeoreference();
this->ResolveCameraManager();
this->ResolveCreditSystem();

if (this->_pTileset == nullptr) {
this->LoadTileset();
}
Expand Down

0 comments on commit 2c06e31

Please sign in to comment.