mirror of
https://github.com/UnnoTed/wireguird
synced 2024-11-24 10:35:29 +00:00
Merge pull request #39 from tgbv/bug-35
fix: Handle the case when no rows are selected
This commit is contained in:
commit
d806a8bc05
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user