fix for own change r33524, at the moment the context always has to be valid, noted with XXX.

reported by Doug Hammond.
This commit is contained in:
Campbell Barton
2010-12-08 03:25:31 +00:00
parent 2e667e45fc
commit 23a49334ed

View File

@@ -5154,6 +5154,11 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
return -1;
}
/* XXX, this is needed because render engine calls without a context
* this should be supported at some point but at the moment its not! */
if(C==NULL)
C= BPy_GetContext();
bpy_context_set(C, &gilstate);
if (!is_static) {