summaryrefslogtreecommitdiff
path: root/collaboration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'collaboration.cpp')
-rw-r--r--collaboration.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/collaboration.cpp b/collaboration.cpp
index b4f7d659..f99409a7 100644
--- a/collaboration.cpp
+++ b/collaboration.cpp
@@ -700,6 +700,8 @@ bool Remote::LoadMetadata()
std::string Remote::RequestAuthenticationToken(const std::string& username, const std::string& password)
{
char* token = BNRemoteRequestAuthenticationToken(m_object, username.c_str(), password.c_str());
+ if (token == nullptr)
+ throw RemoteException("Failed to authenticate");
std::string result = token;
BNFreeString(token);
return result;