Verified Commit 6017bf80 authored by David Parks's avatar David Parks Committed by ma1
Browse files

Bug 2058006 - Call Destroy() unconditionally in ~StatusBarEntry. a=RyanVM DONTBUILD

Allow Destroy() to tear down mIconLoader, even if Init() does not successfully
complete initialization.

Original Revision: https://phabricator.services.mozilla.com/D318206

Differential Revision: https://phabricator.services.mozilla.com/D319879
parent f14f9f44
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,10 +91,10 @@ StatusBarEntry::StatusBarEntry(Element* aMenu) : mMenu(aMenu), mInitted(false) {
}

StatusBarEntry::~StatusBarEntry() {
  Destroy();
  if (!mInitted) {
    return;
  }
  Destroy();
  ::Shell_NotifyIconW(NIM_DELETE, &mIconData);
  VERIFY(::DestroyWindow(mIconData.hWnd));
}