Commit 4090acc7 authored by Sébastien Blin's avatar Sébastien Blin Committed by Andreas Traczyk

registration: fix segfault when looking for a username without account

Change-Id: Id679de538cf8511077bbf3c52157cbabbb260d53
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 17907944
......@@ -209,7 +209,11 @@ lookup_username(UsernameRegistrationBox *view)
const auto username = gtk_entry_get_text(GTK_ENTRY(priv->entry_username));
NameDirectory::instance().lookupName(priv->account, priv->account->nameServiceURL(), username);
if (priv->account) {
NameDirectory::instance().lookupName(priv->account, priv->account->nameServiceURL(), username);
} else {
NameDirectory::instance().lookupName(nullptr, QString(), username);
}
priv->lookup_timeout = 0;
return G_SOURCE_REMOVE;
......
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