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:
authorJoshua Leung <aligorith@gmail.com>2011-03-19 02:14:24 +0300
committerJoshua Leung <aligorith@gmail.com>2011-03-19 02:14:24 +0300
commit5f8e8f2251d473c61f46e6d35cc52b0f7ae20720 (patch)
tree8292e6e004b0099c545eace038758a6f22bee058 /source/blender/editors/space_action/action_ops.c
parent21b2f9423526c583d43fdbdaf90b98426ab2d74b (diff)
Safety checks for macro defines
Diffstat (limited to 'source/blender/editors/space_action/action_ops.c')
-rw-r--r--source/blender/editors/space_action/action_ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index b6fbc34550f..38d221858b3 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -95,9 +95,11 @@ void ED_operatormacros_action(void)
wmOperatorTypeMacro *otmacro;
ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
- RNA_int_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
+ if (ot) {
+ WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
+ otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+ RNA_int_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
+ }
}