Merge branch 'master' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Sat, 11 Dec 2010 11:20:36 +0000 (12:20 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sat, 11 Dec 2010 11:20:36 +0000 (12:20 +0100)
1  2 
lib/gui/elistboxcontent.cpp

@@@ -501,6 -501,7 +501,7 @@@ eListboxPythonMultiContent::~eListboxPy
  {
        Py_XDECREF(m_buildFunc);
        Py_XDECREF(m_selectableFunc);
+       Py_XDECREF(m_template);
  }
  
  void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update)
@@@ -640,8 -641,7 +641,8 @@@ static ePyObject lookupColor(ePyObject 
        if ((icolor & 0xFF000000) == 0xFF000000)
        {
                int index = icolor & 0xFFFFFF;
 -              eDebug("[eListboxPythonMultiContent] template color index: %d", index);
 +              if (PyTuple_GetItem(data, index) == Py_None)
 +                      return ePyObject();
                return PyTuple_GetItem(data, index);
        }
  
@@@ -1159,5 -1159,7 +1160,7 @@@ void eListboxPythonMultiContent::entryR
  
  void eListboxPythonMultiContent::setTemplate(ePyObject tmplate)
  {
+       Py_XDECREF(m_template);
        m_template = tmplate;
+       Py_XINCREF(m_template);
  }