diff options
Diffstat (limited to 'Swift/Controllers/XMPPEvents/EventController.cpp')
| -rw-r--r-- | Swift/Controllers/XMPPEvents/EventController.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/Controllers/XMPPEvents/EventController.cpp b/Swift/Controllers/XMPPEvents/EventController.cpp index 9841923..d84dfe3 100644 --- a/Swift/Controllers/XMPPEvents/EventController.cpp +++ b/Swift/Controllers/XMPPEvents/EventController.cpp @@ -34,7 +34,8 @@ void EventController::handleIncomingEvent(boost::shared_ptr<StanzaEvent> sourceE  	/* If it's a duplicate subscription request, remove the previous request first */  	if (subscriptionEvent) { -		foreach(boost::shared_ptr<StanzaEvent> existingEvent, events_) { +		EventList existingEvents(events_); +		foreach(boost::shared_ptr<StanzaEvent> existingEvent, existingEvents) {  			boost::shared_ptr<SubscriptionRequestEvent> existingSubscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(existingEvent);  			if (existingSubscriptionEvent) {  				if (existingSubscriptionEvent->getJID() == subscriptionEvent->getJID()) {  | 
 Swift