summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmediactrl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 803bacc567..a8025906c7 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -872,7 +872,7 @@ void LLMediaCtrl::calcOffsetsAndSize(S32 *x_offset, S32 *y_offset, S32 *width, S
if (mStretchToFill)
{
- if (mMaintainAspectRatio)
+ if (mMaintainAspectRatio && mMediaSource && mMediaSource->getMediaPlugin())
{
F32 media_aspect = (F32)(mMediaSource->getMediaPlugin()->getWidth()) / (F32)(mMediaSource->getMediaPlugin()->getHeight());
F32 view_aspect = (F32)(r.getWidth()) / (F32)(r.getHeight());