aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tunnelspage.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-29 14:30:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-29 14:30:31 +0200
commit2ee4994be4ead6ae83620b65dbac710216039488 (patch)
tree43483c5c755df7b689c5c4f1f8e3ade393e4403f /ui/tunnelspage.go
parentui: force tray and mtw to appear (diff)
downloadwireguard-windows-2ee4994be4ead6ae83620b65dbac710216039488.tar.xz
wireguard-windows-2ee4994be4ead6ae83620b65dbac710216039488.zip
ui: account for IPC failures in UI initialization
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/tunnelspage.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 86ab1235..469ecdeb 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -44,7 +44,11 @@ func NewTunnelsPage() (*TunnelsPage, error) {
tunnelsContainer, _ := walk.NewComposite(tp)
tunnelsContainer.SetLayout(walk.NewVBoxLayout())
- tp.tunnelsView, _ = NewTunnelsView(tunnelsContainer)
+ //TODO: deal with remaining disposables in case the next line fails
+
+ if tp.tunnelsView, err = NewTunnelsView(tunnelsContainer); err != nil {
+ return nil, err
+ }
tp.tunnelsView.ItemActivated().Attach(tp.onTunnelsViewItemActivated)
tp.tunnelsView.CurrentIndexChanged().Attach(tp.updateConfView)