Skip to content

Fix rendering panic on Z resize - #398

Merged
SpaiR merged 1 commit into
SpaiR:mainfrom
Drulikar:fix_resize_panic
Feb 26, 2026
Merged

Fix rendering panic on Z resize#398
SpaiR merged 1 commit into
SpaiR:mainfrom
Drulikar:fix_resize_panic

Conversation

@Drulikar

@Drulikar Drulikar commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Description

When the quantity of Z levels are changed, and you aren't looking at the first Z, visibleLevel := r.bucket.Level(level) will be nil because the length of bucket levels is 1 instead of say 2. Let me know if there's a better way to flush out rendering work on a resize, but this is a more general solution that should be more reliable.

Fixes https://discord.com/channels/484170914754330625/485190298050363393/1476400437623259216 (Coderbus)
image

To reproduce:

  • Create a new map with 3 Zs
  • View Z 2
  • Resize from 3 Zs to 2 Zs

Maybe it would address #386 and or #314 but I'm not able to reproduce them as described so I don't know.

Type of change

  • Minor changes or tweaks (quality of life stuff)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@SpaiR SpaiR added the fix Fix for the issue label Feb 26, 2026
@SpaiR
SpaiR merged commit afdd70d into SpaiR:main Feb 26, 2026
5 checks passed
@Drulikar
Drulikar deleted the fix_resize_panic branch February 26, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix for the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants