From e787c56a35262bdb5cff69d925b3740661cae549 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 18 Oct 2023 20:31:22 -0400 Subject: [PATCH 1/2] null pointer check if Level Sequence Asset is empty --- CHANGES.md | 1 + Source/CesiumRuntime/Private/Cesium3DTileset.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index ffa6ed95f..cb3e8f56d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ ##### Fixes :wrench: - Fixed a bug that could cause tiles in a Cesium3DTileset to have an incorrect transformation. +- Fixed a crash that happens when a level is played with no Level Sequence Asset assigned. ### v2.0.0 Preview 1 - 2023-10-02 diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index cd64188f4..3bd1e557c 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -602,6 +602,10 @@ void ACesium3DTileset::BeginPlay() { ++sequenceActorIt) { ALevelSequenceActor* sequenceActor = *sequenceActorIt; + if (!IsValid(sequenceActor->GetSequencePlayer())) { + continue; + } + FScriptDelegate playMovieSequencerDelegate; playMovieSequencerDelegate.BindUFunction(this, FName("PlayMovieSequencer")); sequenceActor->GetSequencePlayer()->OnPlay.Add(playMovieSequencerDelegate); From 05f4ddff0ca330b79a2a4551b29ed551f183f644 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 19 Oct 2023 13:52:05 +1100 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cb3e8f56d..0843298b2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,8 +4,8 @@ ##### Fixes :wrench: -- Fixed a bug that could cause tiles in a Cesium3DTileset to have an incorrect transformation. -- Fixed a crash that happens when a level is played with no Level Sequence Asset assigned. +- Fixed a bug that could cause tiles in a `Cesium3DTileset` to have an incorrect transformation. +- Fixed a crash that occurred when a `LevelSequenceActor` in the level did not have a `LevelSequencePlayer` assigned. ### v2.0.0 Preview 1 - 2023-10-02