summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llnotificationstorage.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index fb1adc7ddf..4df2a79b61 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -164,21 +164,29 @@ void LLPersistentNotificationStorage::loadNotifications()
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
- LLNotificationResponderPtr responder(LLResponderRegistry::
- createResponder(notification_params["name"], notification_params["responder"]));
- notification->setResponseFunctor(responder);
+ if (instance.templateExists(notification_params["name"].asString()))
+ {
+ LLNotificationPtr notification(new LLNotification(notification_params));
+
+ LLNotificationResponderPtr responder(LLResponderRegistry::
+ createResponder(notification_params["name"], notification_params["responder"]));
+ notification->setResponseFunctor(responder);
- instance.add(notification);
+ instance.add(notification);
- // hide script floaters so they don't confuse the user and don't overlap startup toast
- LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
+ // hide script floaters so they don't confuse the user and don't overlap startup toast
+ LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
- if(notification_channel)
+ if(notification_channel)
+ {
+ // hide saved toasts so they don't confuse the user
+ notification_channel->hideToast(notification->getID());
+ }
+ }
+ else
{
- // hide saved toasts so they don't confuse the user
- notification_channel->hideToast(notification->getID());
+ llwarns << "Failed to find template for persistent notification " << notification_params["name"].asString() << llendl;
}
}
}