diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/srmm/statusicon.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/modules/srmm/statusicon.cpp b/src/modules/srmm/statusicon.cpp index 0915df7d46..4be925e5eb 100644 --- a/src/modules/srmm/statusicon.cpp +++ b/src/modules/srmm/statusicon.cpp @@ -27,6 +27,10 @@ struct StatusIconChild : public MZeroedObject {
~StatusIconChild()
{
+ if (hIcon)
+ DestroyIcon(hIcon);
+ if (hIconDisabled)
+ DestroyIcon(hIconDisabled);
mir_free(tszTooltip);
}
@@ -96,6 +100,10 @@ INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam) pc->hContact = hContact;
p->arChildren.insert(pc);
}
+ else {
+ if (pc->hIcon)
+ DestroyIcon(pc->hIcon);
+ }
pc->flags = sid->flags;
pc->hIcon = sid->hIcon;
@@ -165,7 +173,10 @@ static INT_PTR GetNthIcon(WPARAM wParam, LPARAM lParam) memcpy(&res, &p, sizeof(res));
if (pc) {
if (pc->hIcon) res.hIcon = pc->hIcon;
- if (pc->hIconDisabled) res.hIconDisabled = pc->hIconDisabled;
+ if (pc->hIconDisabled)
+ res.hIconDisabled = pc->hIconDisabled;
+ else if (pc->hIcon)
+ res.hIconDisabled = pc->hIcon;
if (pc->tszTooltip) res.tszTooltip = pc->tszTooltip;
res.flags = pc->flags;
}
|