Skip to content
Snippets Groups Projects
Commit d7732280 authored by andreykproductengine's avatar andreykproductengine
Browse files

Merged from viewer-lynx

parent fbb5e8b6
No related branches found
No related tags found
No related merge requests found
......@@ -1535,7 +1535,7 @@ LLPointer<LLImageRaw> LLImageRaw::scaled(S32 new_width, S32 new_height)
if ((old_width == new_width) && (old_height == new_height))
{
result = new LLImageRaw(old_width, old_height, components);
if (!result)
if (!result || result->isBufferInvalid())
{
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
return result;
......@@ -1549,7 +1549,7 @@ LLPointer<LLImageRaw> LLImageRaw::scaled(S32 new_width, S32 new_height)
if (new_data_size > 0)
{
result = new LLImageRaw(new_width, new_height, components);
if (!result)
if (!result || result->isBufferInvalid())
{
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment