From a2500ff81409e590667243453f7f86afd404b5d8 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 8 Mar 2013 18:07:28 -0800 Subject: [PATCH] Fix for DBCore crash --- common/dbcore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/dbcore.cpp b/common/dbcore.cpp index 1753ad608..504843db0 100644 --- a/common/dbcore.cpp +++ b/common/dbcore.cpp @@ -38,6 +38,7 @@ DBcore::DBcore() { pDatabase = 0; pCompress = false; pSSL = false; + pStatus = Closed; } DBcore::~DBcore() { @@ -180,9 +181,10 @@ bool DBcore::Open(uint32* errnum, char* errbuf) { LockMutex lock(&MDatabase); if (GetStatus() == Connected) return true; - if (GetStatus() == Error) + if (GetStatus() == Error) { mysql_close(&mysql); mysql_init(&mysql); // Initialize structure again + } if (!pHost) return false; /*