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

[bug] Combo crashes with empty string item #778

Closed
aj3423 opened this issue Mar 4, 2024 · 0 comments · Fixed by #779
Closed

[bug] Combo crashes with empty string item #778

aj3423 opened this issue Mar 4, 2024 · 0 comments · Fixed by #779
Labels
bug Something isn't working

Comments

@aj3423
Copy link

aj3423 commented Mar 4, 2024

What happend?

Combobox crashes if the items contain empty string like:
items = []string{"111", "", "333"}

Code example

main.go
package main

import "github.com/AllenDang/giu"

var sel int32

func loop() {
	giu.SingleWindow().Layout(
		giu.Combo("", "", []string{
			"111",
			"", // <------ crash
			"333",
		}, &sel),
	)
}

func main() {
	wnd := giu.NewMasterWindow("", 400, 200, 0)
	wnd.Run(loop)
}

To Reproduce

  1. Run my demo
  2. will see the crash...

Version

(latest)

OS

Fedora 40

@aj3423 aj3423 added the bug Something isn't working label Mar 4, 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

Successfully merging a pull request may close this issue.

1 participant