diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/notification/windows/DorkboxNotifications.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/notification/windows/DorkboxNotifications.kt index dd6aaccdd20bd9bfdb436fc1e7552e174c77106f..e66371e59f35bbd661949e2bef7cc04906b93b79 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/notification/windows/DorkboxNotifications.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/notification/windows/DorkboxNotifications.kt @@ -41,8 +41,10 @@ class DorkboxNotifications { val data = NOTIFYICONDATA() data.setBalloon(title, message, 10000, NIIF_NONE or NIIF_NOSOUND) - data.setIcon(WinDef.HICON(image)) + val icon = WinDef.HICON(image) + data.setIcon(icon) val ret = Shell32.Shell_NotifyIcon(Shell32.NIM_ADD, data) + User32.INSTANCE.DestroyIcon(icon) println("return value: $ret") }