fix [#27324] WindowManager.invoke_search_popup() crashes blender and does not work
authorCampbell Barton <ideasman42@gmail.com>
Sun, 8 May 2011 12:51:05 +0000 (12:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 8 May 2011 12:51:05 +0000 (12:51 +0000)
also minor formatting fixes.

release/scripts/modules/bpy/utils.py
source/blender/makesrna/intern/rna_modifier.c
source/blender/modifiers/intern/MOD_warp.c
source/blender/windowmanager/intern/wm_operators.c

index 27ac1d6ea792a648e467c40489d687992968ad67..a2d7b9e502f6ecbce30440514e6a2f049a5aaecf 100644 (file)
@@ -35,6 +35,7 @@ import addon_utils as _addon_utils
 
 _script_module_dirs = "startup", "modules"
 
+
 def _test_import(module_name, loaded_modules):
     use_time = _bpy.app.debug
 
index 18a93b9defb6a7476c91c6d883839d6692b92adf..f6cc93664d629120310d094c917501e9ef9d318f 100644 (file)
@@ -79,7 +79,7 @@ EnumPropertyItem modifier_type_items[] ={
        {eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
        {eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
        {eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
-    {eModifierType_Warp, "WARP", ICON_MOD_SUBSURF, "Warp", ""},
+       {eModifierType_Warp, "WARP", ICON_MOD_SUBSURF, "Warp", ""},
        {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
        {0, "", 0, "Simulate", ""},
        {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
index 8e629bf7365d779116c29665a72c5f1e2e79dcfd..27add27deb13dc1d4d7ceac3846359ef5ad9efc4 100644 (file)
@@ -350,7 +350,7 @@ ModifierTypeInfo modifierType_Warp = {
        /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-    /* deformMatricesEM */  NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     0,
        /* applyModifierEM */   0,
        /* initData */          initData,
@@ -359,7 +359,7 @@ ModifierTypeInfo modifierType_Warp = {
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-    /* dependsOnNormals */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
        /* foreachIDLink */     foreachIDLink,
 };
index 63a8ecc4043df5f55acaa4049eb4ddfb8cc482f0..2b8b0dd03937a6df2b4797e270f3c90a13aa73d7 100644 (file)
@@ -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);
+               }
        }
 }