diff options
author | Oz Linden <oz@lindenlab.com> | 2017-08-16 15:43:58 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-08-16 15:43:58 -0400 |
commit | 01e0b78c595e346bef4e771f9580006dd895367c (patch) | |
tree | 90160c9edb07baa4fcfd022082608f96b1bfdc06 /indra/newview/llviewermedia.cpp | |
parent | 2368c44a8e2b031e5a8ac199923a016915cfe96a (diff) | |
parent | cf865bb5962a85e2da3414468d6a99ecb5423f97 (diff) |
merge changes for DRTVWR-439
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 900075488f..114f1d327b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3054,20 +3054,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); + } } } |