aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-27 17:20:41 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-27 17:20:41 +0200
commit8cccfb1e02c6af10557370b3de11bd513cd5f71d (patch)
tree2580e83039c089be8c515ce1e89c946240cc687e /ui
parentui: add WM_SIZING hack back to confview (diff)
downloadwireguard-windows-8cccfb1e02c6af10557370b3de11bd513cd5f71d.tar.xz
wireguard-windows-8cccfb1e02c6af10557370b3de11bd513cd5f71d.zip
ui: do not pass pointer into closure from loop
Diffstat (limited to 'ui')
-rw-r--r--ui/tray.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/tray.go b/ui/tray.go
index 673439ce..c08c06c5 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -193,12 +193,12 @@ func (tray *Tray) addTunnelAction(tunnel *manager.Tunnel) {
tray.ContextMenu().Actions().Insert(trayTunnelActionsOffset+idx, tunnelAction)
go func() {
- state, err := tunnel.State()
+ state, err := tclosure.State()
if err != nil {
return
}
tray.mtw.Synchronize(func() {
- tray.SetTunnelState(tunnel, state, false)
+ tray.SetTunnelState(&tclosure, state, false)
})
}()
}