Skip to content

Fix ResizeUI nullref if component is destroyed#766

Merged
ManlyMarco merged 1 commit intomasterfrom
fix-resize
Sep 28, 2025
Merged

Fix ResizeUI nullref if component is destroyed#766
ManlyMarco merged 1 commit intomasterfrom
fix-resize

Conversation

@ManlyMarco
Copy link
Copy Markdown
Collaborator

No description provided.

@ManlyMarco ManlyMarco requested a review from Copilot September 28, 2025 11:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a null reference exception in the ResizeUI method that occurs when Unity components are destroyed during execution. The fix adds null checks to prevent accessing destroyed components or their GameObjects.

  • Adds null checks for Unity Component objects before accessing their properties
  • Prevents null reference exceptions when components are destroyed during UI resizing operations
  • Uses Unity's implicit bool conversion to detect destroyed objects

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ManlyMarco ManlyMarco merged commit c02224d into master Sep 28, 2025
@ManlyMarco ManlyMarco deleted the fix-resize branch September 28, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants