Skip to content

Commit

Permalink
#3551 Crash at findItemByID
Browse files Browse the repository at this point in the history
  • Loading branch information
akleshchev committed Feb 18, 2025
1 parent 6012168 commit fd0227c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion indra/newview/llchiclet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,11 @@ void LLNotificationChiclet::setCounter(S32 counter)
bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNotificationPtr notification )
{
bool displayNotification;
LLFloaterNotificationsTabbed* floater = LLFloaterNotificationsTabbed::getInstance();
if ( (notification->getName() == "ScriptDialog") // special case for scripts
// if there is no toast window for the notification, filter it
//|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID()))
|| (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID(), notification->getName()))
|| (floater && !floater->findItemByID(notification->getID(), notification->getName()))
)
{
displayNotification = false;
Expand Down

5 comments on commit fd0227c

@Ansariel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically does nothing since LLFloaterNotificationsTabbed::getInstance(); calls LLFloaterReg::getTypedInstance() which will always return an instance (and create one if it doesn't exist yet).

@akleshchev
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crash happens on a 'headless' client, and bufgsplat calims that floater was null. I can only assume that it's not building something.

@Ansariel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least line 243 should be LLFloaterNotificationsTabbed* floater = LLFloaterReg::findTypedInstance<LLFloaterNotificationsTabbed>("notification_well_window"); then. Otherwise the check doesn't make sense.

@akleshchev
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause for this fixis this line in logs: LLFloaterReg::getInstance : Floater type: 'notification_well_window' not registered.

@akleshchev
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admitedly it might be better to shutdown notifications somehow.

Please sign in to comment.