Fix Regression: null UWorld deref in CesiumGaussianSplatSubsystem::Tick#1844
Merged
Conversation
Move IsValid(pWorld) above the IsNetMode(NM_DedicatedServer) deref so a null result from GetPrimaryWorld() no longer crashes InternalGetNetMode. Restores the v2.24.1 ordering inverted by commit 05fce68. Fixes CesiumGS#1841
Contributor
|
Thank you for opening this @UmarMukhtar0039! The fix looks good, sorry that I ended up breaking things 😅 If you could update |
Contributor
Author
|
@j9liu This is ready |
Contributor
|
Thanks @UmarMukhtar0039! I confirmed that this does fix the crash in standalone game mode. It seems that Gaussian splats don't show up in the standalone window, unfortunately, but that can be addressed as a separate issue. I'll wait for CI to pass before merge. Thanks again! |
j9liu
approved these changes
May 26, 2026
Contributor
Author
|
Hi @j9liu I also noticed that. I am pretty sure it has to do with how we get the world context - the function GetPrimaryWorld() the code early exits if we are not in the editor. I'll see what I can do in my free time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved IsValid(pWorld) above the IsNetMode(NM_DedicatedServer) deref so a null result from GetPrimaryWorld() no longer crashes InternalGetNetMode. Restores the v2.24.1 ordering inverted by commit 05fce68.
Fixes #1841
Description
Restore the
IsValid(pWorld)check above thepWorld->IsNetMode(NM_DedicatedServer)deref inUCesiumGaussianSplatSubsystem::Tick. This is the ordering that shipped in 2.24.1 (UE 5.7 Marketplace) and was inadvertently regressed in commit 05fce68 ("close to working [skip ci]") during the recent Niagara/Gaussian-splat refactor.This fixes #1841 and also Play in Standalone in Unreal projects with Cesium enabled.
Issue number or link
#1841 and also Play in Standalone crash in Unreal projects with Cesium enabled.
Author checklist
CHANGES.mdwith a short summary of my change (for user-facing changes).[ ] I have added or updated unit tests to ensure consistent code coverage as necessary.[ ] I have updated the documentation as necessary.Remaining Tasks
NA
Testing plan
Reviewer checklist
Thank you for taking the time to review this PR. By approving a PR you are taking as much responsibility for these changes as the author.
As you review, please go through the checklist below:
CHANGES.mdto make sure they accurately cover the work in this PR.