Skip to content

Commit

Permalink
example/wde: report window creation errors
Browse files Browse the repository at this point in the history
(instead of silently hanging)
  • Loading branch information
sqweek committed Oct 2, 2021
1 parent c326b49 commit aa40666
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example/wde/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ func events(events <-chan interface{}) {

func main() {
go func() {
w, _ := wde.NewWindow(300, 300)
w, err := wde.NewWindow(300, 300)
if err != nil {
fmt.Println("Error creating window:", err)
wde.Stop()
return
}
loadR = image.Rect(0, 0, 300, 150)
saveR = image.Rect(0, 150, 300, 300)
w.Show()
Expand Down

0 comments on commit aa40666

Please sign in to comment.