From 2b603a7fc1f242aab4e7f2b7239fb297cf8d93a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 19 May 2015 11:44:03 +0000 Subject: [PATCH] Fix issue #278 --- include/MySQL_Thread.h | 4 +++- lib/MySQL_Thread.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/MySQL_Thread.h b/include/MySQL_Thread.h index d09396f57..89783ef7b 100644 --- a/include/MySQL_Thread.h +++ b/include/MySQL_Thread.h @@ -71,7 +71,9 @@ class ProxySQL_Poll { ~ProxySQL_Poll() { unsigned int i; for (i=0;imyds_type==MYDS_LISTENER) { + if ( + myds[i] && // fix bug #278 . This should be caused by not initialized datastreams used to ping the backend + myds[i]->myds_type==MYDS_LISTENER) { delete myds[i]; } } diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 99bd696fb..cbc0b7bb6 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -600,7 +600,9 @@ MySQL_Thread::~MySQL_Thread() { } unsigned int i; for (i=0;imyds_type==MYDS_LISTENER) { + if ( + mypolls.myds[i] && // fix bug #278 . This should be caused by not initialized datastreams used to ping the backend + mypolls.myds[i]->myds_type==MYDS_LISTENER) { delete mypolls.myds[i]; } }