Merge pull request #39 from tgbv/bug-35

fix: Handle the case when no rows are selected
This commit is contained in:
UnnoTed 2023-09-30 16:26:33 -03:00 committed by GitHub
commit d806a8bc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,6 +413,10 @@ func (t *Tunnels) Create() error {
btnDelTunnel.Connect("clicked", func() {
err := func() error {
row := tl.GetSelectedRow()
if row == nil {
return errors.New("No row selected.")
}
name, err := row.GetName()
if err != nil {
return err