From 7e7dce7928ea2d57c1ee2d0e2b82082d997ac578 Mon Sep 17 00:00:00 2001 From: WiSo Date: Mon, 24 Dec 2012 10:01:16 +0100 Subject: [PATCH] safe delete m_source on windows as well. unlikely we hit it but you'll never know. --- xbmc/interfaces/python/XBPyThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/interfaces/python/XBPyThread.cpp b/xbmc/interfaces/python/XBPyThread.cpp index 171f393024983..ed9fe86cbd08b 100644 --- a/xbmc/interfaces/python/XBPyThread.cpp +++ b/xbmc/interfaces/python/XBPyThread.cpp @@ -103,6 +103,8 @@ XBPyThread::~XBPyThread() void XBPyThread::setSource(const CStdString &src) { + if (m_source) + delete [] m_source; #ifdef TARGET_WINDOWS CStdString strsrc; if (m_type == 'F') @@ -113,7 +115,6 @@ void XBPyThread::setSource(const CStdString &src) m_source = new char[strsrc.GetLength()+1]; strcpy(m_source, strsrc); #else - if (m_source) delete [] m_source; m_source = new char[src.GetLength()+1]; strcpy(m_source, src); #endif