Commit 2e1f80b8 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Fix Google Groupware segfault

If m_account is null, the code tried to call m_account->accountName().
This could happen when clicking "Configure" in the settings dialog.
parent 8f253404
Pipeline #43621 failed with stage
in 15 minutes and 52 seconds
...@@ -129,7 +129,9 @@ void GoogleSettingsDialog::accountChanged() ...@@ -129,7 +129,9 @@ void GoogleSettingsDialog::accountChanged()
void GoogleSettingsDialog::slotConfigure() void GoogleSettingsDialog::slotConfigure()
{ {
const QString username = m_account && m_account->accountName().isEmpty() ? QString() : m_account->accountName(); const QString username = m_account && !m_account->accountName().isEmpty()
? m_account->accountName()
: QString();
m_account = AccountPtr(new Account()); m_account = AccountPtr(new Account());
const QList<QUrl> resourceScopes = m_resource->scopes(); const QList<QUrl> resourceScopes = m_resource->scopes();
for (const QUrl &scope : resourceScopes) { for (const QUrl &scope : resourceScopes) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment