From 7a9e2c8750f68e084802a19cd48153b715f11882 Mon Sep 17 00:00:00 2001 From: Joesis Date: Sun, 17 May 2020 17:33:56 -0700 Subject: [PATCH] Unlock menuItemsLock before changing UI Fixes https://github.com/getlantern/systray/issues/133 --- systray.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systray.go b/systray.go index 987e9d2..82158ed 100644 --- a/systray.go +++ b/systray.go @@ -187,8 +187,8 @@ func (item *MenuItem) Uncheck() { // update propagates changes on a menu item to systray func (item *MenuItem) update() { menuItemsLock.Lock() - defer menuItemsLock.Unlock() menuItems[item.id] = item + menuItemsLock.Unlock() addOrUpdateMenuItem(item) }