Skip to content
This repository
Browse code

safe delete m_source on windows as well. unlikely we hit it but you'l…

…l never know.
  • Loading branch information...
commit 7e7dce7928ea2d57c1ee2d0e2b82082d997ac578 1 parent d0d318e
wsoltys authored December 24, 2012

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  xbmc/interfaces/python/XBPyThread.cpp
3  xbmc/interfaces/python/XBPyThread.cpp
@@ -103,6 +103,8 @@ XBPyThread::~XBPyThread()
103 103
 
104 104
 void XBPyThread::setSource(const CStdString &src)
105 105
 {
  106
+  if (m_source) 
  107
+    delete [] m_source;
106 108
 #ifdef TARGET_WINDOWS
107 109
   CStdString strsrc;
108 110
   if (m_type == 'F')
@@ -113,7 +115,6 @@ void XBPyThread::setSource(const CStdString &src)
113 115
   m_source  = new char[strsrc.GetLength()+1];
114 116
   strcpy(m_source, strsrc);
115 117
 #else
116  
-  if (m_source) delete [] m_source;
117 118
   m_source  = new char[src.GetLength()+1];
118 119
   strcpy(m_source, src);
119 120
 #endif

0 notes on commit 7e7dce7

Please sign in to comment.
Something went wrong with that request. Please try again.