From 1415c07691ffb541d1aac162265e9a9b6affa713 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 12 Jun 2024 12:11:55 -0400 Subject: Prevent crash when failing to authenticate with remote --- collaboration.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'collaboration.cpp') 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; -- cgit v1.3.1