summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2018-03-06 09:48:44 -0800
committerGraham Madarasz <graham@lindenlab.com>2018-03-06 09:48:44 -0800
commitb9016f99f3abf8b135942e60a5a2d8cd8f0f4e75 (patch)
tree7e0dc18306309254b5d8cd5f40ac6ce897409242 /indra/llimage/llimage.cpp
parentf8134b152d1a7273e27a224eac11d52c0a6f94c9 (diff)
parentaf9069edbff9df73cd75753b696aabd1ae8769b5 (diff)
Merged lindenlab/viewer-cougar into default
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r--indra/llimage/llimage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index cd7125197c..4a76d15096 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -748,7 +748,11 @@ U8* LLImageBase::allocateData(S32 size)
{
size = 0;
mWidth = mHeight = 0;
- mData = NULL;
+ if (mData)
+ {
+ deleteData(); // virtual
+ mData = NULL;
+ }
}
mDataSize = size;
claimMem(mDataSize);
@@ -775,6 +779,7 @@ U8* LLImageBase::reallocateData(S32 size)
disclaimMem(mDataSize);
mDataSize = size;
claimMem(mDataSize);
+ mBadBufferAllocation = false;
return mData;
}