diff --git a/lib/remote/apiuser.cpp b/lib/remote/apiuser.cpp index 0caac19ff..606e66dcc 100644 --- a/lib/remote/apiuser.cpp +++ b/lib/remote/apiuser.cpp @@ -69,7 +69,7 @@ ApiUser::Ptr ApiUser::GetByAuthHeader(const String& auth_header) return nullptr; else { Dictionary::Ptr passwordDict = user->GetPasswordDict(); - if (!ComparePassword(passwordDict->Get("password"), password, passwordDict->Get("salt"))) + if (!passwordDict || !ComparePassword(passwordDict->Get("password"), password, passwordDict->Get("salt"))) return nullptr; }