Skip to content

fix: Correctly check for SpriteButton sprite existence#1216

Merged
EttyKitty merged 1 commit into
Adeptus-Dominus:mainfrom
carys-the-weed-cloud:main
Jun 4, 2026
Merged

fix: Correctly check for SpriteButton sprite existence#1216
EttyKitty merged 1 commit into
Adeptus-Dominus:mainfrom
carys-the-weed-cloud:main

Conversation

@carys-the-weed-cloud
Copy link
Copy Markdown
Contributor

@carys-the-weed-cloud carys-the-weed-cloud commented Jun 4, 2026

This was causing a crash when hovering over a SpriteButton (noteably in the Armamentarium window).


Summary by cubic

Fixes a crash when hovering a SpriteButton by correctly checking for missing hover sprite and click sound. We now test against undefined instead of -1, preventing invalid asset access (e.g., in the Armamentarium window).

Written for commit 8830148. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added Size: Tiny Type: Fix This is a fix for a bug labels Jun 4, 2026
@EttyKitty EttyKitty changed the title fix: Correctly check for SpriteButton sprite existence. fix: Correctly check for SpriteButton sprite existence Jun 4, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Fixes a crash by correctly checking for undefined hover sprite and click sound instead of -1, a trivial and safe change that prevents invalid asset access in SpriteButton.

Re-trigger cubic

@EttyKitty EttyKitty merged commit 7b4dc66 into Adeptus-Dominus:main Jun 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: Tiny Type: Fix This is a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants