forked from bartvdbraak/blender
take 2 at fixing the crash...
This commit is contained in:
parent
e5078f196f
commit
bfbfe16570
@ -6242,7 +6242,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
|
|||||||
|
|
||||||
/* annoying!, need to check if the screen gets set to NULL which is a
|
/* annoying!, need to check if the screen gets set to NULL which is a
|
||||||
* hint that the file was actually re-loaded. */
|
* hint that the file was actually re-loaded. */
|
||||||
const char is_valid_wm= (CTX_wm_manager(C) != NULL);
|
char is_valid_wm;
|
||||||
|
|
||||||
PropertyRNA *pret_single= NULL;
|
PropertyRNA *pret_single= NULL;
|
||||||
void *retdata_single= NULL;
|
void *retdata_single= NULL;
|
||||||
@ -6269,6 +6269,8 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
|
|||||||
if(C==NULL)
|
if(C==NULL)
|
||||||
C= BPy_GetContext();
|
C= BPy_GetContext();
|
||||||
|
|
||||||
|
is_valid_wm= (CTX_wm_manager(C) != NULL);
|
||||||
|
|
||||||
bpy_context_set(C, &gilstate);
|
bpy_context_set(C, &gilstate);
|
||||||
|
|
||||||
if (!is_static) {
|
if (!is_static) {
|
||||||
@ -6505,7 +6507,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
|
|||||||
if ( (!is_static) &&
|
if ( (!is_static) &&
|
||||||
(ptr->data) &&
|
(ptr->data) &&
|
||||||
(RNA_struct_is_a(ptr->type, &RNA_Operator)) &&
|
(RNA_struct_is_a(ptr->type, &RNA_Operator)) &&
|
||||||
is_valid_wm == (CTX_wm_manager(C) != NULL))
|
(is_valid_wm == (CTX_wm_manager(C) != NULL)))
|
||||||
{
|
{
|
||||||
wmOperator *op= ptr->data;
|
wmOperator *op= ptr->data;
|
||||||
reports= op->reports;
|
reports= op->reports;
|
||||||
|
Loading…
Reference in New Issue
Block a user