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:
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r--source/blender/editors/armature/poselib.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index b06c7286859..d6f93757505 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -436,13 +436,16 @@ static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *ptr,
return NULL;
memset(&item_tmp, 0, sizeof(item_tmp));
-
- /* add each marker to the list */
- for (marker=act->markers.first, i=0; marker; marker= marker->next, i++) {
- item_tmp.identifier= item_tmp.name= marker->name;
- item_tmp.icon= ICON_ARMATURE_DATA;
- item_tmp.value= i;
- RNA_enum_item_add(&item, &totitem, &item_tmp);
+
+ /* check that the action exists */
+ if (act) {
+ /* add each marker to the list */
+ for (marker=act->markers.first, i=0; marker; marker= marker->next, i++) {
+ item_tmp.identifier= item_tmp.name= marker->name;
+ item_tmp.icon= ICON_ARMATURE_DATA;
+ item_tmp.value= i;
+ RNA_enum_item_add(&item, &totitem, &item_tmp);
+ }
}
if (i > 0) {