mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-10-15 23:11:03 -04:00
fixed bug causing crash when rsPlugins is not initialized yet
This commit is contained in:
parent
e2b2c1ae44
commit
5592c667ae
1 changed files with 12 additions and 8 deletions
|
@ -861,15 +861,19 @@ void NotifyQt::handleIncomingEvent(std::shared_ptr<const RsEvent> event)
|
||||||
|
|
||||||
|
|
||||||
/*Now check Plugins*/
|
/*Now check Plugins*/
|
||||||
int pluginCount = rsPlugins->nbPlugins();
|
|
||||||
|
|
||||||
for (int i = 0; i < pluginCount; ++i) {
|
if(rsPlugins) // rsPlugins may not be initialized yet if we're handlign TorManager events.
|
||||||
RsPlugin *rsPlugin = rsPlugins->plugin(i);
|
{
|
||||||
if (rsPlugin) {
|
int pluginCount = rsPlugins->nbPlugins();
|
||||||
ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify();
|
|
||||||
if (toasterNotify) {
|
for (int i = 0; i < pluginCount; ++i) {
|
||||||
insertToaster(toasterNotify->toasterItem());
|
RsPlugin *rsPlugin = rsPlugins->plugin(i);
|
||||||
continue;
|
if (rsPlugin) {
|
||||||
|
ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify();
|
||||||
|
if (toasterNotify) {
|
||||||
|
insertToaster(toasterNotify->toasterItem());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue