summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-11-23 23:28:10 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-11-24 15:15:10 +0200
commitdce1fae986f4f61f51e7825de903aa58239c28c8 (patch)
treecd87bab800cfa7859f8cd3d6521de0666234308b /indra/newview
parenta1fed466f0cc0c08d3cdcba88e02230c94e763b0 (diff)
SL-17076 MacOS crash on clearing ChicletNotificationChannel
Crash appears to happens inside mItems.clear() of the LLNotificationChannelBase, but there is no apparent reson for it and stack jumped some steps, so I'm doing cleanup more explicitly to see if it's indeed there and not a corruption somewhere earlier.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchiclet.cpp5
-rw-r--r--indra/newview/llchiclet.h11
2 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index cc4f4536a4..3444f50e52 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -177,6 +177,11 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this);
}
+LLNotificationChiclet::~LLNotificationChiclet()
+{
+ mNotificationChannel.reset();
+}
+
void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data)
{
std::string action = user_data.asString();
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 58a797218f..1698fa269a 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -531,8 +531,9 @@ public:
struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
protected:
- struct ChicletNotificationChannel : public LLNotificationChannel
+ class ChicletNotificationChannel : public LLNotificationChannel
{
+ public:
ChicletNotificationChannel(LLNotificationChiclet* chiclet)
: LLNotificationChannel(LLNotificationChannel::Params().filter(filterNotification).name(chiclet->getSessionId().asString()))
, mChiclet(chiclet)
@@ -542,6 +543,7 @@ protected:
connectToChannel("Offer");
connectToChannel("Notifications");
}
+ virtual ~ChicletNotificationChannel() {}
static bool filterNotification(LLNotificationPtr notify);
// connect counter updaters to the corresponding signals
@@ -553,9 +555,10 @@ protected:
};
boost::scoped_ptr<ChicletNotificationChannel> mNotificationChannel;
-
- LLNotificationChiclet(const Params& p);
-
+
+ LLNotificationChiclet(const Params& p);
+ ~LLNotificationChiclet();
+
/**
* Processes clicks on chiclet menu.
*/