diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 3d4357111224657d2593d631bb1b5e93441dd2ee..dbe7f3779ba9f422cd0d9679a0fd11d9ebb8019f 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -641,7 +641,7 @@ void LLChicletPanel::removeChiclet(const LLUUID& im_session_id) { LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); - if(chiclet->getSessionId() == im_session_id) + if(chiclet && chiclet->getSessionId() == im_session_id) { removeChiclet(it); return; diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 77b0201de27437db4e1ac919cd7a8350c117d35d..2d52e7409eee21bde78576763c6d9dea7e072b76 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -926,7 +926,8 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) { LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(getHost()); // Show the messages pane when opening a floater hosted in the Conversations - host_floater->collapseMessagesPane(false); + if (host_floater) + host_floater->collapseMessagesPane(false); } mInputButtonPanel->setVisible(isTornOff()); @@ -1102,7 +1103,7 @@ void LLFloaterIMSessionTab::saveCollapsedState() // virtual void LLFloaterIMSessionTab::applyMUPose(std::string& text) { - static LLCachedControl<bool> useMUPose(gSavedSettings, "AlchemyChatMUPose", false); + static LLCachedControl<bool> useMUPose(gSavedSettings, "AlchemyChatMUPose", false); if (!useMUPose) return; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3c8181b76dde086604ee6538f11ff3561e3a1332..51a6a57a5c39e18114614e17deffe207c3a2a405 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1252,18 +1252,20 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) { LLFloaterSidePanelContainer* inventory_floater = dynamic_cast<LLFloaterSidePanelContainer*>(*iter); - inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel"); - - if (inventory_floater && inventory_panel && inventory_floater->getVisible()) - { - S32 z_order = gFloaterView->getZOrder(inventory_floater); - if (z_order < z_min) - { - res = inventory_panel->getActivePanel(); - z_min = z_order; - active_inv_floaterp = inventory_floater; - } - } + if (inventory_floater) + { + inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel"); + if (inventory_panel && inventory_floater->getVisible()) + { + S32 z_order = gFloaterView->getZOrder(inventory_floater); + if (z_order < z_min) + { + res = inventory_panel->getActivePanel(); + z_min = z_order; + active_inv_floaterp = inventory_floater; + } + } + } } if (res) diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 451f41cd3bfe6dfa756ac9ea2f95ad97ffacacf9..caa830c68c15c5daa0a91398e570157dc7bf4ae9 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -111,7 +111,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) } LLUUID group_id; // used for SL-23488 - LLSelectMgr::getInstance()->selectGetGroup(group_id); // sets group_id as a side effect SL-23488 + (void)LLSelectMgr::getInstance()->selectGetGroup(group_id); // sets group_id as a side effect SL-23488 // BUG? Check for all objects being editable? bool editable = gAgent.isGodlike() diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index b3c455f4ecd132b660d6019960726222cb5a86a4..9ab99018964340cb59758e83e42a85dc65b07afd 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -194,7 +194,7 @@ public: void requestGroupLandInfo(); - int getStoredContribution(); + S32 getStoredContribution(); void setYourContributionTextField(int contrib); void setYourMaxContributionTextBox(int max); @@ -343,14 +343,14 @@ bool LLPanelGroupLandMoney::impl::applyContribution() // Retrieves the land contribution for this agent that is currently // stored in the database, NOT what is currently entered in the text field -int LLPanelGroupLandMoney::impl::getStoredContribution() +S32 LLPanelGroupLandMoney::impl::getStoredContribution() { LLGroupData group_data; group_data.mContribution = 0; - gAgent.getGroupData(mPanel.mGroupID, group_data); + bool found_group = gAgent.getGroupData(mPanel.mGroupID, group_data); - return group_data.mContribution; + return found_group ? group_data.mContribution : 0; } // Fills in the text field with the contribution, contrib diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 0b612ff53574523030cc5621a8152018cf07ff9f..f71d8f6ab1fb395744d25604e2a0e2ac7dde646f 100755 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -469,7 +469,7 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ bool all_face_media_navigated = false; LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); - selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); + (void)selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); // Note: we don't update the 'current URL' field until the media data itself changes diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index cfd27c7b655ae9355f0e5a26e095e5c71534a341..760fa10fff22c926fa4b898a10baf3b16642cbd8 100755 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -314,10 +314,11 @@ void LLPanelPrimMediaControls::updateShape() { bool mini_controls = false; LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData(); - if (media_data && NULL != dynamic_cast<LLVOVolume*>(objectp)) + LLVOVolume *vol = dynamic_cast<LLVOVolume*>(objectp); + if (media_data && vol) { // Don't show the media controls if we do not have permissions - enabled = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL); + enabled = vol->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL); mini_controls = (LLMediaEntry::MINI == media_data->getControls()); } const bool is_hud = objectp->isHUDAttachment(); diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index c50ddf3054705dfa96b366f894e9effa16422b74..95f89a6ebff3956cf98b48b1b13ed728b973674b 100755 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -492,8 +492,7 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button) if (incoming_floater && incoming_floater->isShown()) { - LLCallDialog* incoming = dynamic_cast<LLCallDialog *>(incoming_floater); - llassert(incoming); + LLCallDialog* incoming = static_cast<LLCallDialog *>(incoming_floater); LLDockControl* dock_control = incoming->getDockControl(); if (dock_control->getDock() == NULL) @@ -504,8 +503,7 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button) if (outgoing_floater && outgoing_floater->isShown()) { - LLCallDialog* outgoing = dynamic_cast<LLCallDialog *>(outgoing_floater); - llassert(outgoing); + LLCallDialog* outgoing = static_cast<LLCallDialog *>(outgoing_floater); LLDockControl* dock_control = outgoing->getDockControl(); if (dock_control->getDock() == NULL)