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; BString data;
data.SetToFormat("Debug report successfully saved to '%s'", data.SetToFormat("Debug report successfully saved to '%s'",
message->FindString("path")); message->FindString("path"));
BAlert *alert = new BAlert("Report saved", data.String(), BAlert *alert = new(std::nothrow) BAlert("Report saved",
"OK"); data.String(), "Close");
if (alert == NULL)
break;
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go(); alert->Go();
break; break;