From 8554eb5fcd1bfe7066ae6f6130378a1dfa3141dc Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Mon, 24 Jun 2013 15:01:16 -0700
Subject: [PATCH] SH-4242 FIX interesting: Mac viewer crashes on exit made
 notifications subsystem touch instancetracker<notificationchannel> in
 constructor so that teardown order is preserved

---
 indra/llui/llnotifications.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 37b0a520361..7932299281f 100755
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1207,6 +1207,9 @@ LLNotifications::LLNotifications()
 	mIgnoreAllNotifications(false)
 {
 	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
+
+	// touch the instance tracker for notification channels, so that it will still be around in our destructor
+	LLInstanceTracker<LLNotificationChannel, std::string>::instanceCount();
 }
 
 
-- 
GitLab