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

binding.Untyped crashes when set to nil #4807

Closed
2 tasks done
williambrode opened this issue Apr 24, 2024 · 1 comment
Closed
2 tasks done

binding.Untyped crashes when set to nil #4807

williambrode opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@williambrode
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When setting a binding.Untyped to nil, it crashes. I expect this case to work - since the type I'm using is a pointer and could be nil. The code seems to handle nil properly in several code paths, but not for .Set()

How to reproduce

Set binding.Untyped to something other than nil, then set it to nil.

Screenshots

No response

Example code

 a := binding.NewUntyped()
 a.Set(nil)  // this is fine since it's already set to nil
 b := 1
 a.Set(&b)
 a.Set(nil) // crashes

Fyne version

2.4.4

Go compiler version

1.19.3

Operating system and version

Windows 10

Additional Information

No response

@williambrode williambrode added the unverified A bug that has been reported but not verified label Apr 24, 2024
@andydotxyz
Copy link
Member

Thanks to @Dorbmon this is now fixed on develop

@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants