Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-08 16:51:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-08 16:51:05 +0400
commitb43252079953e6eefad092927e578c80f695d788 (patch)
treec6e8dabec386895a6aad69c6689d73dbd36d594b /source/blender/windowmanager
parentd4e540dff398c8a438ecdd0d13f9de9acc07f46c (diff)
fix [#27324] WindowManager.invoke_search_popup() crashes blender and does not work
also minor formatting fixes.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 63a8ecc4043..2b8b0dd0393 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -698,11 +698,16 @@ static void operator_enum_call_cb(struct bContext *C, void *arg1, void *arg2)
wmOperatorType *ot= arg1;
if(ot) {
- PointerRNA props_ptr;
- WM_operator_properties_create_ptr(&props_ptr, ot);
- RNA_property_enum_set(&props_ptr, ot->prop, GET_INT_FROM_POINTER(arg2));
- WM_operator_name_call(C, ot->idname, WM_OP_EXEC_DEFAULT, &props_ptr);
- WM_operator_properties_free(&props_ptr);
+ if(ot->prop) {
+ PointerRNA props_ptr;
+ WM_operator_properties_create_ptr(&props_ptr, ot);
+ RNA_property_enum_set(&props_ptr, ot->prop, GET_INT_FROM_POINTER(arg2));
+ WM_operator_name_call(C, ot->idname, WM_OP_EXEC_DEFAULT, &props_ptr);
+ WM_operator_properties_free(&props_ptr);
+ }
+ else {
+ printf("operator_enum_call_cb: op->prop for '%s' is NULL\n", ot->idname);
+ }
}
}