blender would crash if the "sys" module didnt import, now just give a warning and continue.

This commit is contained in:
2008-10-02 16:59:08 +00:00
parent 0110133cf7
commit 1b3e2d7c02

View File

@@ -306,13 +306,15 @@ void syspath_append( char *dirname )
ok = 0;
}
if (PySequence_Contains(path, dir)==0) { /* Only add if we need to */
if (ok && PySequence_Contains(path, dir)==0) { /* Only add if we need to */
if (ok && PyList_Append( path, dir ) != 0) /* decref below */
ok = 0; /* append failed */
if( (ok==0) || PyErr_Occurred( ) )
Py_FatalError( "could import or build sys.path, can't continue" );
}
if( (ok==0) || PyErr_Occurred( ) )
fprintf(stderr, "could import or build sys.path\n" );
PyErr_Clear()
Py_DECREF( dir );
Py_XDECREF( mod_sys );
}