Skip to content

Commit

Permalink
make sure to check the URI for nil since even when cancel button is c…
Browse files Browse the repository at this point in the history
…lick the callback function is invoked.
  • Loading branch information
lazyhacker committed Apr 9, 2021
1 parent d09a812 commit d38225d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/guimain/fyne.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ func (a *GetGo) Init(w fyne.Window) {
func() {
dialog.ShowFolderOpen(
func(uri fyne.ListableURI, err error) {
if uri == nil || err != nil {
return
}
// TODO: Should look into data binding for these fields.
a.savepath = uri.Path()
a.lblSavePath.SetText(uri.Path())
}, a.parent)

}, w)
},
)

Expand Down

0 comments on commit d38225d

Please sign in to comment.