diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 21:06:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 21:06:31 +0400 |
commit | e0d585b6c9f7187e8537193b41be10fba60b3a27 (patch) | |
tree | 8e78c6fffc2210781ea4912f63981c7b91649388 /source/blender | |
parent | 63731453e2583c1e64d5d631b855559ce6ec0862 (diff) |
fix for crash in recent changes, missing NULL check
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 5d9819689d3..cd3d5c97f99 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -615,13 +615,17 @@ static char *wm_prop_pystring_from_context(bContext *C, PointerRNA *ptr, Propert if (member_found) { prop_str = RNA_path_property_py(ptr, prop, index); - ret = BLI_sprintfN("bpy.context.%s.%s", member_found, prop_str); - MEM_freeN(prop_str); + if (prop_str) { + ret = BLI_sprintfN("bpy.context.%s.%s", member_found, prop_str); + MEM_freeN(prop_str); + } } else if (member_id) { prop_str = RNA_path_struct_property_py(ptr, prop, index); - ret = BLI_sprintfN("bpy.context.%s.%s", member_id, prop_str); - MEM_freeN(prop_str); + if (prop_str) { + ret = BLI_sprintfN("bpy.context.%s.%s", member_id, prop_str); + MEM_freeN(prop_str); + } } BLI_freelistN(&lb); |