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:
parent
c1e73fbf52
commit
30c47afa79
@ -247,7 +247,7 @@ Debugger::MessageReceived(BMessage* message)
|
||||
fTeamsWindow = TeamsWindow::Create(&fSettingsManager);
|
||||
if (fTeamsWindow != NULL)
|
||||
fTeamsWindow->Show();
|
||||
} catch(...) {
|
||||
} catch (...) {
|
||||
// TODO: Notify the user!
|
||||
fprintf(stderr, "Error: Failed to create Teams window\n");
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -245,7 +246,7 @@ TeamsListView::MessageReceived(BMessage* message)
|
||||
|
||||
TeamListItem* item = new(std::nothrow) TeamListItem(team);
|
||||
if (item != NULL) {
|
||||
AddItem(new TeamListItem(team));
|
||||
AddItem(item);
|
||||
SortItems(&TeamListItem::Compare);
|
||||
}
|
||||
break;
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -44,7 +45,7 @@ TeamsWindow::Create(SettingsManager* settingsManager)
|
||||
|
||||
try {
|
||||
self->_Init();
|
||||
} catch(...) {
|
||||
} catch (...) {
|
||||
delete self;
|
||||
throw;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user