GIFTranslator: call new(std::nothrow) BBitmap again

... to prevent throwing a std::bad_alloc exception if there isn't
enough memory to allocate a new BBitmap.

This effectively reverts 116e78d4d4

Thanks Axel and AnEvilYak and sorry for the noise.
This commit is contained in:
John Scipione
2014-03-06 16:19:48 -05:00
parent 15791c196f
commit 7b46114834
@@ -167,7 +167,10 @@ GetBitmap(BPositionIO* in, BBitmap** out)
header.dataSize = B_BENDIAN_TO_HOST_INT32(header.dataSize);
// dump data from stream into a BBitmap
*out = new BBitmap(header.bounds, header.colors);
*out = new(std::nothrow) BBitmap(header.bounds, header.colors);
if (*out == NULL)
return B_NO_MEMORY;
if (!(*out)->IsValid()) {
delete *out;
return B_NO_MEMORY;