From 59062cec1cf108863f1101b193b7dfe89e79cb28 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 22:16:12 -0400 Subject: Fix use after free of inventory offer in LLGroupNoticeNotificationListItem::onClickAttachment This is due to forceResponse deleting the inventory offer upon completion --- indra/newview/llnotificationlistitem.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 6a79a0c68c..f86edfd0cf 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -521,8 +521,6 @@ void LLGroupNoticeNotificationListItem::close() void LLGroupNoticeNotificationListItem::onClickAttachment() { if (mInventoryOffer != NULL) { - mInventoryOffer->forceResponse(IOR_ACCEPT); - static const LLUIColor textColor = LLUIColorTable::instance().getColor( "GroupNotifyDimmedTextColor"); mAttachmentTextBox->setColor(textColor); @@ -532,7 +530,7 @@ void LLGroupNoticeNotificationListItem::onClickAttachment() if (!isAttachmentOpenable(mInventoryOffer->mType)) { LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD()); } - + mInventoryOffer->forceResponse(IOR_ACCEPT); mInventoryOffer = NULL; } } -- cgit v1.2.3