From c3e0753455e096fbd908c20dcc0bde1f2935bd4c Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sun, 18 Jan 2015 18:13:39 +0100 Subject: [PATCH] Fix a mysql crash after CString -> ke::AString conversion --- dlls/mysqlx/threading.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/mysqlx/threading.cpp b/dlls/mysqlx/threading.cpp index ef642c72..eba5cc99 100644 --- a/dlls/mysqlx/threading.cpp +++ b/dlls/mysqlx/threading.cpp @@ -567,7 +567,8 @@ void AtomicResult::CopyFrom(IResultSet *rs) { *m_Table[i] = rs->FieldNumToName(i); } else { - m_Table[i] = new ke::AString(rs->FieldNumToName(i)); + const char* string = rs->FieldNumToName(i); + m_Table[i] = new ke::AString(string ? string : ""); } } @@ -582,7 +583,8 @@ void AtomicResult::CopyFrom(IResultSet *rs) { *m_Table[idx] = row->GetString(i); } else { - m_Table[idx] = new ke::AString(row->GetString(i)); + const char* string = row->GetString(i); + m_Table[idx] = new ke::AString(string ? string : ""); } } rs->NextRow();