Fix memory leak + style cleanup. Thanks Axel!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38787 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -245,7 +246,7 @@ TeamsListView::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
TeamListItem* item = new(std::nothrow) TeamListItem(team);
|
TeamListItem* item = new(std::nothrow) TeamListItem(team);
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
AddItem(new TeamListItem(team));
|
AddItem(item);
|
||||||
SortItems(&TeamListItem::Compare);
|
SortItems(&TeamListItem::Compare);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user