From 21d8a7f09ce544240a4d70df6e8879996c5059f6 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 3 Oct 2017 15:17:35 +0300 Subject: startup crash fix --- indra/newview/llmediactrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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()); -- cgit v1.2.3