fixed bug causing hidden nodes to crash at start

This commit is contained in:
csoler 2022-04-16 18:45:38 +02:00
parent de87938e6e
commit 20335cf134
2 changed files with 16 additions and 13 deletions

View file

@ -485,11 +485,11 @@ void MainWindow::initStackedPage()
addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify);
//List All notify before Setting was created
QList<QPair<MainPage*, QPair<QAction*, QListWidgetItem*> > >::iterator notifyIt;
for (notifyIt = notify.begin(); notifyIt != notify.end(); ++notifyIt) {
UserNotify *userNotify = notifyIt->first->getUserNotify();
for (auto notifyIt:notify)
{
UserNotify *userNotify = notifyIt.first->getUserNotify();
if (userNotify) {
userNotify->initialize(ui->toolBarPage, notifyIt->second.first, notifyIt->second.second);
userNotify->initialize(ui->toolBarPage, notifyIt.second.first, notifyIt.second.second);
connect(userNotify, SIGNAL(countChanged()), this, SLOT(updateTrayCombine()));
userNotifyList.push_back(userNotify);
}