Skip to content

Enhance null-checks for various components - #974

Open
Spagles wants to merge 3 commits into
rwmt:devfrom
Spagles:master
Open

Enhance null-checks for various components#974
Spagles wants to merge 3 commits into
rwmt:devfrom
Spagles:master

Conversation

@Spagles

@Spagles Spagles commented Jul 29, 2026

Copy link
Copy Markdown

Improve null-checks in the TeachingPatches, AsyncWorldTimeComp, and ThingDespawnUnsetForbidden classes to prevent potential null reference exceptions during execution.

@notfood
notfood changed the base branch from master to dev July 29, 2026 14:14
@notfood notfood added fix Fixes for a bug or desync. 1.6 Fixes or bugs relating to 1.6 (Not Odyssey). labels Jul 29, 2026
@notfood notfood moved this to In review in 1.6 and Odyssey Jul 29, 2026

@notfood notfood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. A small detail.

{
if (Multiplayer.Client == null) return;
__instance.Map.MpComp().Notify_ThingDespawned(__instance);
__instance.Map?.MpComp()?.Notify_ThingDespawned(__instance);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this can't ever be null. Did you get errors somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6 Fixes or bugs relating to 1.6 (Not Odyssey). fix Fixes for a bug or desync.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants