From 9d6dc47cf4d71ea6c12c838dc81f75c458f0d79a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 28 Aug 2014 02:15:37 -0400 Subject: [PATCH] Fix crash with MySQLRequestResult::ErrorMessage() --- common/mysql_request_result.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/mysql_request_result.h b/common/mysql_request_result.h index cd561be56..ab84eeb18 100644 --- a/common/mysql_request_result.h +++ b/common/mysql_request_result.h @@ -40,7 +40,7 @@ public: MySQLRequestResult& operator=(MySQLRequestResult&& other); bool Success() const { return m_Success;} - std::string ErrorMessage() const {return std::string(m_ErrorBuffer);} + std::string ErrorMessage() const {return m_ErrorBuffer ? std::string(m_ErrorBuffer) : std::string("");} uint32 ErrorNumber() const {return m_ErrorNumber;} uint32 RowsAffected() const {return m_RowsAffected;} uint32 RowCount() const {return m_RowCount;}