summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-02-22 15:39:22 -0800
committerRick Pasetto <rick@lindenlab.com>2010-02-22 15:39:22 -0800
commite55bb59a785b67ad9267d71789b08821f0a991ae (patch)
treeb3c941982af855dcad205eae852bab6a3784bc33
parent722c5fb92ebcf61190edc7ec29c8f5ea1f826cf9 (diff)
EXT-5633: Fix crash pressing PLAY on parcel media when media is disabled
Good catch, Leyla
-rw-r--r--indra/newview/llpanelnearbymedia.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 8ad5389566..52cdd386c9 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -1075,15 +1075,18 @@ void LLPanelNearByMedia::onClickSelectedMediaPlay()
{
LLViewerMediaImpl *impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
- if (NULL != impl && impl->isMediaTimeBased() && impl->isMediaPaused())
+ if (NULL != impl)
{
- // Aha! It's really time-based media that's paused, so unpause
- impl->play();
- return;
- }
- else if (impl->isParcelMedia())
- {
- LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ if (impl->isMediaTimeBased() && impl->isMediaPaused())
+ {
+ // Aha! It's really time-based media that's paused, so unpause
+ impl->play();
+ return;
+ }
+ else if (impl->isParcelMedia())
+ {
+ LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ }
}
}
}