diff options
| author | Kevin Smith <git@kismith.co.uk> | 2011-10-17 15:40:06 (GMT) |
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2011-10-17 15:40:06 (GMT) |
| commit | 5b1063b0df14f16fb8d0f0e811fc014e67489ad6 (patch) | |
| tree | 33d9e4b76d3eca635c5e2284db4af7459da5455d /Swift | |
| parent | 76978866497a7dd9be96edef5fa06f470a6b324f (diff) | |
| download | swift-contrib-5b1063b0df14f16fb8d0f0e811fc014e67489ad6.zip swift-contrib-5b1063b0df14f16fb8d0f0e811fc014e67489ad6.tar.bz2 | |
Don't crash in ad-hoc after signout/signin.
Resolves: #1014
Diffstat (limited to 'Swift')
| -rw-r--r-- | Swift/Controllers/MainController.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index 364dd57..71740d4 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -206,70 +206,72 @@ void MainController::purgeCachedCredentials() { } void MainController::resetClient() { purgeCachedCredentials(); resetCurrentError(); resetPendingReconnects(); vCardPhotoHash_.clear(); delete contactEditController_; contactEditController_ = NULL; delete profileController_; profileController_ = NULL; delete eventWindowController_; eventWindowController_ = NULL; delete chatsManager_; chatsManager_ = NULL; delete ftOverview_; ftOverview_ = NULL; delete rosterController_; rosterController_ = NULL; delete eventNotifier_; eventNotifier_ = NULL; delete presenceNotifier_; presenceNotifier_ = NULL; delete certificateStorage_; certificateStorage_ = NULL; delete storages_; storages_ = NULL; delete statusTracker_; statusTracker_ = NULL; delete profileSettings_; profileSettings_ = NULL; delete userSearchControllerChat_; userSearchControllerChat_ = NULL; delete userSearchControllerAdd_; userSearchControllerAdd_ = NULL; + delete adHocManager_; + adHocManager_ = NULL; clientInitialized_ = false; } void MainController::handleUIEvent(boost::shared_ptr<UIEvent> event) { boost::shared_ptr<ToggleNotificationsUIEvent> notificationsEvent = boost::dynamic_pointer_cast<ToggleNotificationsUIEvent>(event); if (notificationsEvent) { bool enabled = notificationsEvent->getEnabled(); notifier_->setPersistentEnabled(enabled); settings_->storeBool(SHOW_NOTIFICATIONS, enabled); } } void MainController::resetPendingReconnects() { timeBeforeNextReconnect_ = -1; if (reconnectTimer_) { reconnectTimer_->stop(); reconnectTimer_.reset(); } resetCurrentError(); } void MainController::resetCurrentError() { if (lastDisconnectError_) { lastDisconnectError_->conclude(); lastDisconnectError_ = boost::shared_ptr<ErrorEvent>(); } } void MainController::handleConnected() { boundJID_ = client_->getJID(); resetCurrentError(); resetPendingReconnects(); if (eagleMode_) { purgeCachedCredentials(); |
Swift