diff --git a/src/core/snore.cpp b/src/core/snore.cpp index b7b0184..e9b0cdd 100644 --- a/src/core/snore.cpp +++ b/src/core/snore.cpp @@ -209,15 +209,18 @@ bool SnoreCore::setPrimaryNotificationBackend ( const QString &backend ) qDebug()<<"Unknown Backend:"<(PluginContainer::pluginCache()[backend]->load()); if(!b->isInitialized()){ if(!b->init(this)){ - qDebug()<<"Failed to initialize"<name(); + qDebug() << "Failed to initialize" << b->name(); return false; } - disconnect(m_notificationBackend,SIGNAL(closeNotification(Snore::Notification))); - connect(b,SIGNAL(closeNotification(Snore::Notification)),this,SLOT(slotNotificationClosed(Snore::Notification))); + if(m_notificationBackend) + { + disconnect(m_notificationBackend, SIGNAL(closeNotification)); + } + connect(b, SIGNAL(closeNotification), this, SLOT(slotNotificationClosed)); } m_notificationBackend = b; return true;