AlchSync: Change dynamic_casts to LLVOVolume to asVolume()

This commit is contained in:
Liru Færs
2020-01-04 23:31:15 -05:00
parent e81affce51
commit 19ad64cc96
12 changed files with 42 additions and 28 deletions

View File

@@ -320,7 +320,7 @@ void LLPanelPrimMediaControls::updateShape()
{
bool mini_controls = false;
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
LLVOVolume *vol = dynamic_cast<LLVOVolume*>(objectp);
LLVOVolume *vol = objectp ? objectp->asVolume() : nullptr;
if (media_data && vol)
{
// Don't show the media controls if we do not have permissions