[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15978] trunk/blender/source/gameengine/ Converter/KX_IpoConvert.cpp: Fix segmentation faul in GE.
Diego Borghetti
bdiego at gmail.com
Tue Aug 5 23:20:15 CEST 2008
Revision: 15978
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15978
Author: bdiego
Date: 2008-08-05 23:20:14 +0200 (Tue, 05 Aug 2008)
Log Message:
-----------
Fix segmentation faul in GE.
We assign the material name before check the pointer.
Please Benoit check this and also I have a compiler warning
about the second argument in the previous call of
ConvertMaterialIpos, the argument is NULL but the function
need a dword.
Modified Paths:
--------------
trunk/blender/source/gameengine/Converter/KX_IpoConvert.cpp
Modified: trunk/blender/source/gameengine/Converter/KX_IpoConvert.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_IpoConvert.cpp 2008-08-05 18:49:51 UTC (rev 15977)
+++ trunk/blender/source/gameengine/Converter/KX_IpoConvert.cpp 2008-08-05 21:20:14 UTC (rev 15978)
@@ -773,8 +773,11 @@
for (int material_index=1; material_index <= blenderobject->totcol; material_index++)
{
Material *mat = give_current_material(blenderobject, material_index);
- STR_HashedString matname = mat->id.name;
- if(mat) ConvertMaterialIpos(mat, matname.hash(), gameobj, converter);
+ STR_HashedString matname;
+ if(mat) {
+ matname= mat->id.name;
+ ConvertMaterialIpos(mat, matname.hash(), gameobj, converter);
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list