[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33830] trunk/blender/source/gameengine/ VideoTexture/PyTypeList.cpp: Fixing a segfault from my last commit.
Mitchell Stokes
mogurijin at gmail.com
Tue Dec 21 08:35:16 CET 2010
Revision: 33830
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33830
Author: moguri
Date: 2010-12-21 08:35:13 +0100 (Tue, 21 Dec 2010)
Log Message:
-----------
Fixing a segfault from my last commit. Make sure we have a list before trying to clear it.
Modified Paths:
--------------
trunk/blender/source/gameengine/VideoTexture/PyTypeList.cpp
Modified: trunk/blender/source/gameengine/VideoTexture/PyTypeList.cpp
===================================================================
--- trunk/blender/source/gameengine/VideoTexture/PyTypeList.cpp 2010-12-21 06:58:44 UTC (rev 33829)
+++ trunk/blender/source/gameengine/VideoTexture/PyTypeList.cpp 2010-12-21 07:35:13 UTC (rev 33830)
@@ -31,8 +31,10 @@
/// destructor
PyTypeList::~PyTypeList()
{
- for (PyTypeListType::iterator it = m_list->begin(); it != m_list->end(); ++it)
- delete *it;
+ // if list exists
+ if (m_list.get() != NULL)
+ for (PyTypeListType::iterator it = m_list->begin(); it != m_list->end(); ++it)
+ delete *it;
}
/// check, if type is in list
More information about the Bf-blender-cvs
mailing list