StyledEdit: Fix PVS 1167

Use new(std::nothrow) so that NULL check for allocated memory makes sense.

Change-Id: I6c0e66c63adda430686727a4085132c4e40c7530
Reviewed-on: https://review.haiku-os.org/692
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Murai Takashi
2018-11-13 19:58:08 +00:00
committed by waddlesplash
parent 82bbd737a1
commit 71103e733c
+1 -1
View File
@@ -881,7 +881,7 @@ StyledEditWindow::OpenFile(entry_ref* ref)
return;
}
fSaveMessage = new BMessage(B_SAVE_REQUESTED);
fSaveMessage = new(std::nothrow) BMessage(B_SAVE_REQUESTED);
if (fSaveMessage) {
BEntry entry(ref, true);
BEntry parent;