Scripts:
- Campbell Barton updated his Wavefront obj importer; - Jean-Michel Soler updated his paths import (eps part). BPython bug fixes: - oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c): http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127 - Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch: http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127 - doc updates (suggested by Campbell) Thanks guys.
This commit is contained in:
@@ -491,11 +491,12 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args )
|
||||
if( !PyArg_ParseTuple( args, "s", &text ) )
|
||||
return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
|
||||
"expected string argument" ) );
|
||||
if (self) {
|
||||
MEM_freeN (self->curve->str);
|
||||
self->curve->str= MEM_mallocN (strlen (text)+1, "str");
|
||||
strcpy (self->curve->str, text);
|
||||
self->curve->pos= strlen (text);
|
||||
if( self ) {
|
||||
MEM_freeN( self->curve->str );
|
||||
self->curve->str = MEM_mallocN( strlen (text)+1, "str" );
|
||||
strcpy( self->curve->str, text );
|
||||
self->curve->pos = strlen ( text );
|
||||
self->curve->len = strlen ( text );
|
||||
}
|
||||
Py_INCREF( Py_None );
|
||||
return Py_None;
|
||||
|
||||
Reference in New Issue
Block a user