diff options
Diffstat (limited to 'accounts.cpp')
-rw-r--r-- | accounts.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/accounts.cpp b/accounts.cpp index 8a71668..5ae7363 100644 --- a/accounts.cpp +++ b/accounts.cpp @@ -58,8 +58,11 @@ Context * DcAccounts::getSelectedAccount() { dc_context_t *context = dc_accounts_get_selected_account(m_accounts); - - return new Context(this, context); + if (context) { + return new Context(this, context); + } else { + return nullptr; + } } bool |