summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-08-23 09:19:59 -0400
committerOz Linden <oz@lindenlab.com>2017-08-23 09:19:59 -0400
commitbcf5dc079a5dc9434b541a971e28315fa5cb9816 (patch)
tree16f6b186d704ca9682bcbfcb8aca1e29ef85b103 /indra/newview/llviewermedia.cpp
parentfa53653e60f5761c157b76423b4449fe38788d8f (diff)
parent08cbed55ef5689fcc5a02dfb3b9afde15487036e (diff)
merge changes for 5.0.7-release
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 82e181ac06..ca7a27eed1 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3050,20 +3050,23 @@ void LLViewerMediaImpl::update()
data = mMediaSource->getBitsData();
}
- // Offset the pixels pointer to match x_pos and y_pos
- data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
- data += ( y_pos * mMediaSource->getTextureDepth() );
-
+ if(data != NULL)
{
- LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
- placeholder_image->setSubImage(
- data,
- mMediaSource->getBitsWidth(),
- mMediaSource->getBitsHeight(),
- x_pos,
- y_pos,
- width,
- height);
+ // Offset the pixels pointer to match x_pos and y_pos
+ data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
+ data += ( y_pos * mMediaSource->getTextureDepth() );
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
+ placeholder_image->setSubImage(
+ data,
+ mMediaSource->getBitsWidth(),
+ mMediaSource->getBitsHeight(),
+ x_pos,
+ y_pos,
+ width,
+ height);
+ }
}
}