Fix use after free of inventory offer in LLGroupNoticeNotificationListItem::onClickAttachment

This is due to forceResponse deleting the inventory offer upon completion
meow-7.2.2
Rye Mutt 2022-10-19 22:16:12 -04:00
parent 2745465c73
commit 59062cec1c
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}
}