Skip to content
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

Guard for nil when closing windows #3878

Merged
merged 1 commit into from
May 9, 2023

Conversation

imran-iq
Copy link
Contributor

@imran-iq imran-iq commented May 8, 2023

Description:

As described in: #3870 (comment)
When the autogenerated quit is called from the main menu, if any windows were created but not shown, the program with panic. This is because the viewport would be nil.

This can be fixed with a nil check in closed

Fixes #3870

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

The test that I added fails without my added changes, verified with go test fyne.io/fyne/v2/internal/driver/glfw -run ClosedBeforeShow however on my local machine I have some tests that fail irregardless of my changes (padding/resizing/hoverable) so I am not checking the last box

@imran-iq imran-iq marked this pull request as ready for review May 8, 2023 17:26
@coveralls
Copy link

Coverage Status

Coverage: 62.044%. Remained the same when pulling 5c7695b on imran-iq:fix-nil-viewport into ec0d80e on fyne-io:develop.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Excellent thanks

@andydotxyz andydotxyz merged commit 4b01822 into fyne-io:develop May 9, 2023
11 checks passed
@andydotxyz
Copy link
Member

Many thanks and congratulations on your first Fyne patch :)

@imran-iq imran-iq deleted the fix-nil-viewport branch May 9, 2023 17:40
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.

None yet

3 participants