Skip to content

Fixing a crash when minimizing a window with custom viewport. (#16704) #18916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RuelYasa
Copy link

Objective

Fix a crash when minimizing a window. (#16704) It happens when the window contains Camera with a custom Viewport.

Solution

Remove ExtractedCamera when the corresponding camera in main world has zero target size. It indicates that the window is minimized.

Testing

Tested in Windows 11.
Previously the split_screen example crashes when the window is minimized; and with this change, it would not crash. Other behaviors remain unchanged.

# Objective

Fix a crash when minimizing a window. (bevyengine#16704) It happens when the window contains Camera with Viewport.

# Solution

Remove ExtractedCamera when the camera in main world has zero target size.
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@ickshonpe ickshonpe added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Rendering Drawing game state to the screen labels Apr 29, 2025
@RuelYasa
Copy link
Author

RuelYasa commented May 6, 2025

Bump. It should be a minor modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants