NotificationWindow: fix memory leak

Thanks to mt for analysis of the problem. Fixed in a different way from
the original patch.

Fixes #13135.
This commit is contained in:
Adrien Destugues 2017-01-01 11:17:56 +01:00
parent e32c64c113
commit 6e02aa9d1c
1 changed files with 3 additions and 3 deletions

View File

@ -168,9 +168,6 @@ NotificationWindow::MessageReceived(BMessage* message)
else
be_roster->GetAppInfo("application/x-vnd.Be-SHEL", &info);
NotificationView* view = new NotificationView(this,
notification, timeout);
bool allow = false;
appfilter_t::iterator it = fAppFilters.find(info.signature);
@ -199,6 +196,9 @@ NotificationWindow::MessageReceived(BMessage* message)
} else
group = aIt->second;
NotificationView* view = new NotificationView(this,
notification, timeout);
group->AddInfo(view);
_ShowHide();