xo-object2: DInteger: fail without ub on oom.
This commit is contained in:
parent
4fdaa64085
commit
1ae18830a7
1 changed files with 4 additions and 1 deletions
|
|
@ -18,7 +18,10 @@ namespace xo {
|
|||
void * mem = mm.alloc(typeseq::id<DInteger>(),
|
||||
sizeof(DInteger));
|
||||
|
||||
return new (mem) DInteger(x);
|
||||
if (mem)
|
||||
return new (mem) DInteger(x);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue