diff --git a/src/internet/dropbox/dropboxservice.cpp b/src/internet/dropbox/dropboxservice.cpp index cb81f7184..9448c0ee3 100644 --- a/src/internet/dropbox/dropboxservice.cpp +++ b/src/internet/dropbox/dropboxservice.cpp @@ -171,6 +171,10 @@ void DropboxService::RequestFileListFinished(QNetworkReply* reply) { } void DropboxService::LongPollDelta() { + if (!has_credentials()) { + // Might have been signed out by the user. + return; + } QSettings s; s.beginGroup(kSettingsGroup); diff --git a/src/internet/dropbox/dropboxsettingspage.cpp b/src/internet/dropbox/dropboxsettingspage.cpp index 1b0f5aa76..df982c2ad 100644 --- a/src/internet/dropbox/dropboxsettingspage.cpp +++ b/src/internet/dropbox/dropboxsettingspage.cpp @@ -90,6 +90,9 @@ bool DropboxSettingsPage::eventFilter(QObject* object, QEvent* event) { void DropboxSettingsPage::LogoutClicked() { ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedOut); + QSettings s; + s.beginGroup(DropboxService::kSettingsGroup); + s.remove("access_token2"); } void DropboxSettingsPage::Connected() {