diff --git a/lib/EAPBase/src/Credentials.cpp b/lib/EAPBase/src/Credentials.cpp index 82e6a6a..d0e61fa 100644 --- a/lib/EAPBase/src/Credentials.cpp +++ b/lib/EAPBase/src/Credentials.cpp @@ -145,7 +145,9 @@ wstring eap::credentials::get_identity() const tstring eap::credentials::get_name() const { - return !empty() ? get_identity() : _T(""); + if (empty()) return _T(""); + tstring identity(std::move(get_identity())); + return !identity.empty() ? identity : _T(""); }