Add missing error check.

This commit is contained in:
Rene Gollent 2013-06-21 18:53:36 -04:00
parent 21d8063591
commit ecd9ecb132

View File

@ -264,8 +264,11 @@ TeamWindow::MessageReceived(BMessage* message)
BString data;
data.SetToFormat("Debug report successfully saved to '%s'",
message->FindString("path"));
BAlert *alert = new BAlert("Report saved", data.String(),
"OK");
BAlert *alert = new(std::nothrow) BAlert("Report saved",
data.String(), "Close");
if (alert == NULL)
break;
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
break;