From e1c8126d157dc39415d1a743d8f4fdb1277746db Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:58:33 -0400 Subject: Fix nullptr crash in LLScrollListCtrl::getSelectedItemLabel --- indra/llui/llscrolllistctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 74a9641836..1d9564d107 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1479,7 +1479,11 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const item = getFirstSelected(); if (item) { - return item->getColumn(column)->getValue().asString(); + auto col = item->getColumn(column); + if(col) + { + return col->getValue().asString(); + } } return LLStringUtil::null; -- cgit v1.2.3 From 75799eb22b546de8130190479c57ce112f973c80 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:07 -0400 Subject: Fix crash in LLViewerWindow::handleDragNDrop --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2869c53992..9dc12c4856 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1271,7 +1271,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLTextureEntry *te = obj->getTE(object_face); // can modify URL if we can modify the object or we have navigate permissions - bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ); + bool allow_modify_url = obj->permModify() || (te && obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT )); if (te && allow_modify_url ) { -- cgit v1.2.3 From 3bd774894f651b0f1a300909193af8299fe3dabc Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:35 -0400 Subject: Fix nullptr crash in handleVSyncChanged --- indra/newview/llviewercontrol.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 1d483f1b8a..0e1f4c09c7 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -263,12 +263,15 @@ static bool handleAnisotropicChanged(const LLSD& newvalue) static bool handleVSyncChanged(const LLSD& newvalue) { LLPerfStats::tunables.vsyncEnabled = newvalue.asBoolean(); - gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean()); - - if (newvalue.asBoolean()) + if (gViewerWindow && gViewerWindow->getWindow()) { - U32 current_target = gSavedSettings.getU32("TargetFPS"); - gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target)); + gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean()); + + if (newvalue.asBoolean()) + { + U32 current_target = gSavedSettings.getU32("TargetFPS"); + gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target)); + } } return true; -- cgit v1.2.3 From d609cbaf54498e685315cffc14cfdeb0c139dcf0 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:59 -0400 Subject: Fix nullptr crash in LLInventoryPanel::itemChanged --- indra/newview/llinventorypanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6c58eb2ca4..1a6e25fb0f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -643,7 +643,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve } // Select any newly created object that has the auto rename at top of folder root set. - if(mFolderRoot.get()->getRoot()->needsAutoRename()) + if(mFolderRoot.get() && mFolderRoot.get()->getRoot()->needsAutoRename()) { setSelection(item_id, false); } -- cgit v1.2.3 From fdc0e14c1ba6e963ca6fd19381d9d1a77599c209 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:00:37 -0400 Subject: Fix nullptr crash in LLLandmarksPanel::isActionEnabled --- indra/newview/llpanellandmarks.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 99133d1fb3..45cfd146be 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -647,10 +647,18 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const if ("collapse_all" == command_name) { + if (!mCurrentSelectedList) + { + return false; + } return has_expanded_folders(mCurrentSelectedList->getRootFolder()); } else if ("expand_all" == command_name) { + if (!mCurrentSelectedList) + { + return false; + } return has_collapsed_folders(mCurrentSelectedList->getRootFolder()); } else if ("sort_by_date" == command_name) -- cgit v1.2.3 From 177a21d072e05dd28a09368e3b235d362b258f9e Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:00:58 -0400 Subject: Fix nullptr crash in LLLandmarksPanel::canItemBeModified --- indra/newview/llpanellandmarks.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 45cfd146be..fb7ccbfe4c 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -967,12 +967,12 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold // then ask LLFolderView permissions - LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); + LLFolderView* root_folder = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : nullptr; if ("copy" == command_name) { // we shouldn't be able to copy folders from My Inventory Panel - return can_be_modified && root_folder->canCopy(); + return can_be_modified && root_folder && root_folder->canCopy(); } else if ("collapse" == command_name) { @@ -989,7 +989,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold if ("cut" == command_name) { - can_be_modified = root_folder->canCut(); + can_be_modified = root_folder && root_folder->canCut(); } else if ("rename" == command_name) { @@ -1001,7 +1001,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold } else if("paste" == command_name) { - can_be_modified = root_folder->canPaste(); + can_be_modified = root_folder && root_folder->canPaste(); } else { -- cgit v1.2.3 From baca6ae98061b407295352dd6fdd4901a724e862 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:01:24 -0400 Subject: Fix nullptr crash in LLInvFVBridge::getClipboardEntries --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e40ab86010..8f3dc3ce16 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -961,7 +961,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (obj->getType() != LLAssetType::AT_CATEGORY) + if (obj && obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Paste Separator")); } -- cgit v1.2.3 From dbc7704a4a6d992845abf38d6bfc5d9f3ffe5893 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:02:09 -0400 Subject: Fix null region pointer crash in LLIMView --- indra/newview/llimview.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b12c2fdc52..33e6d2d1b2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3042,13 +3042,16 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload gIMMgr->addSession(correct_session_name, type, session_id, payload["voice_channel_info"]); - std::string url = gAgent.getRegion()->getCapability( + std::string url = gAgent.getRegionCapability( "ChatSessionRequest"); if (voice) { - LLCoros::instance().launch("chatterBoxInvitationCoro", - boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"])); + if(!url.empty()) + { + LLCoros::instance().launch("chatterBoxInvitationCoro", + boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"])); + } // send notification message to the corresponding chat if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc") @@ -4063,9 +4066,12 @@ public: // Send request for chat history, if enabled. if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory")) { - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLCoros::instance().launch("chatterBoxHistoryCoro", - boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0)); + std::string url = gAgent.getRegionCapability("ChatSessionRequest"); + if (!url.empty()) + { + LLCoros::instance().launch("chatterBoxHistoryCoro", + boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0)); + } } } } -- cgit v1.2.3 From d1e8e8d24d7adb7e5a64e0495a9b71aa5acda6e4 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:02:31 -0400 Subject: Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked --- indra/newview/llfloaterimcontainer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index add389748f..08e13276b3 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -988,11 +988,14 @@ void LLFloaterIMContainer::onAddButtonClicked() { LLView * button = findChild("conversations_pane_buttons_expanded")->findChild("add_btn"); LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); - - if (picker && root_floater) + if (button && root_floater) { - root_floater->addDependentFloater(picker); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); + + if (picker) + { + root_floater->addDependentFloater(picker); + } } } -- cgit v1.2.3 From 15877bf396f1b37784a8449540335960190862d0 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:03:11 -0400 Subject: Whitespace fix --- indra/newview/llxmlrpctransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index ba48b58f3b..48461241a2 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -316,7 +316,7 @@ bool LLXMLRPCTransaction::Impl::process() if (!LLXMLNode::parseBuffer(mResponseText.data(), mResponseText.size(), root, nullptr)) { - LL_WARNS() << "Failed parsing XML in response; request URI: " + LL_WARNS() << "Failed parsing XML in response; request URI: " << mURI << LL_ENDL; } else if (parseResponse(root)) -- cgit v1.2.3