Guard single-corner geometry smoothing against missing portal neighbors#1200
Guard single-corner geometry smoothing against missing portal neighbors#1200Copilot wants to merge 9 commits into
Conversation
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/c0329567-576d-4e94-be74-c2b46e121f4c Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
|
@copilot Would you be able to provide reproduction steps for the original issue? What do we have to do in order to get the original error before the fix was applied? Also, please double-check that the changes don't cause any regressions for other places in the code. |
Most likely repro before
That path goes through I also re-checked the regression scope on |
There was a problem hiding this comment.
Pull request overview
Guards the geometry smoothing logic in EditorActions.EditSectorGeometry so single-corner smoothing no longer crashes when portal/boundary neighbor sector lookups fail, improving editor stability during corner-based geometry hotkeys.
Changes:
- Added null-safe handling when resolving the “origin” sector for single-corner smoothing.
- Added null-safe handling for each corner-neighbor sector comparison via a small local helper.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Selecting a wall corner and applying geometry hotkeys could throw a
NullReferenceExceptioninsideEditorActions.EditSectorGeometry. The failure came from the single-corner smoothing path assuming portal/boundary neighbor lookups always returned a validRoomSectorPair.Problem
originSector/cornerSectorswithout validating that the portal lookup resolved to a real room-sector pair.Change
EditSectorGeometry.Implementation detail