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:
committed by
waddlesplash
parent
82bbd737a1
commit
71103e733c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user