From 10e7b598fa1d53da0454f87ad72d0b68a1b32a81 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:30:40 +0000 Subject: CID-147 Checker: NULL_RETURNS Function: LLNotificationChannelPanel::onClickNotificationReject(void *) File: /indra/newview/llfloaternotificationsconsole.cpp --- indra/newview/llfloaternotificationsconsole.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 90db8988b2..8b110f5846 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -124,10 +124,15 @@ void LLNotificationChannelPanel::onClickNotificationReject(void* user_data) { LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data; if (!self) return; - void* data = self->getChild("notification_rejects_list")->getFirstSelected()->getUserdata(); - if (data) + LLScrollListItem* firstselected = self->getChild("notification_rejects_list")->getFirstSelected(); + llassert(firstselected); + if (firstselected) { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + void* data = firstselected->getUserdata(); + if (data) + { + gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + } } } -- cgit v1.2.3 From 1b8a7fdeaab78216baad1f916e9788c0b90287b3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:32:55 +0000 Subject: CID-146 Checker: NULL_RETURNS Function: LLNotificationChannelPanel::onClickNotification(void *) File: /indra/newview/llfloaternotificationsconsole.cpp --- indra/newview/llfloaternotificationsconsole.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 8b110f5846..94b5ebba00 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -112,10 +112,15 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data) { LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data; if (!self) return; - void* data = self->getChild("notifications_list")->getFirstSelected()->getUserdata(); - if (data) + LLScrollListItem* firstselected = self->getChild("notifications_list")->getFirstSelected(); + llassert(firstselected); + if (firstselected) { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + void* data = firstselected->getUserdata(); + if (data) + { + gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + } } } -- cgit v1.2.3