mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-10-13 14:01: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*/
|
||||
int pluginCount = rsPlugins->nbPlugins();
|
||||
|
||||
for (int i = 0; i < pluginCount; ++i) {
|
||||
RsPlugin *rsPlugin = rsPlugins->plugin(i);
|
||||
if (rsPlugin) {
|
||||
ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify();
|
||||
if (toasterNotify) {
|
||||
insertToaster(toasterNotify->toasterItem());
|
||||
continue;
|
||||
if(rsPlugins) // rsPlugins may not be initialized yet if we're handlign TorManager events.
|
||||
{
|
||||
int pluginCount = rsPlugins->nbPlugins();
|
||||
|
||||
for (int i = 0; i < pluginCount; ++i) {
|
||||
RsPlugin *rsPlugin = rsPlugins->plugin(i);
|
||||
if (rsPlugin) {
|
||||
ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify();
|
||||
if (toasterNotify) {
|
||||
insertToaster(toasterNotify->toasterItem());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue