EXP-1499 FIXED Added some NULL checks in notifications UI code to avoid a crash on exit.
The crash happened if connection timed out while there were unread object inventory offers.meow-7.2.2
parent
16b6a47247
commit
5dc8e44c76
|
|
@ -250,6 +250,12 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p)
|
|||
|
||||
LLIMWellChiclet::~LLIMWellChiclet()
|
||||
{
|
||||
LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance();
|
||||
if (im_well_window)
|
||||
{
|
||||
im_well_window->setSysWellChiclet(NULL);
|
||||
}
|
||||
|
||||
LLIMMgr::getInstance()->removeSessionObserver(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -408,9 +408,16 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
|
|||
}
|
||||
|
||||
// remove related chiclet
|
||||
LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id);
|
||||
if (LLChicletBar::instanceExists())
|
||||
{
|
||||
LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id);
|
||||
}
|
||||
|
||||
LLIMWellWindow::getInstance()->removeObjectRow(notification_id);
|
||||
LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance();
|
||||
if (im_well_window)
|
||||
{
|
||||
im_well_window->removeObjectRow(notification_id);
|
||||
}
|
||||
|
||||
mNotifications.erase(notification_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
|
|||
LLTransientDockableFloater::setVisible(visible);
|
||||
|
||||
// update notification channel state
|
||||
initChannel(); // make sure the channel still exists
|
||||
if(mChannel)
|
||||
{
|
||||
mChannel->updateShowToastsState();
|
||||
|
|
@ -598,6 +599,13 @@ LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
|
|||
return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/)
|
||||
{
|
||||
return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key);
|
||||
}
|
||||
|
||||
BOOL LLIMWellWindow::postBuild()
|
||||
{
|
||||
BOOL rv = LLSysWellWindow::postBuild();
|
||||
|
|
@ -751,7 +759,10 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
|
|||
{
|
||||
if (mMessageList->removeItemByValue(notification_id))
|
||||
{
|
||||
mSysWellChiclet->updateWidget(isWindowEmpty());
|
||||
if (mSysWellChiclet)
|
||||
{
|
||||
mSysWellChiclet->updateWidget(isWindowEmpty());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ public:
|
|||
~LLIMWellWindow();
|
||||
|
||||
static LLIMWellWindow* getInstance(const LLSD& key = LLSD());
|
||||
static LLIMWellWindow* findInstance(const LLSD& key = LLSD());
|
||||
static void initClass() { getInstance(); }
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
|
|
|||
Loading…
Reference in New Issue