summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index fa2c070ea0..e3ac56d0d3 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1619,7 +1619,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
mNeedsCreateTexture = TRUE;
if (preCreateTexture())
{
- ref();
#if LL_IMAGEGL_THREAD_CHECK
//grab a copy of the raw image data to make sure it isn't modified pending texture creation
U8* data = mRawImage->getData();
@@ -1635,6 +1634,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr;
if (mainq)
{
+ ref();
mainq->postTo(
mImageQueue,
// work to be done on LLImageGL worker thread
@@ -1681,7 +1681,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
else
{
gTextureList.mCreateTextureList.insert(this);
- unref();
}
}
}