From adddfffe231b066ed701852b6a378f2f7561d7a4 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 14 Oct 2009 00:01:34 +0000 Subject: * Fixed crash with operator cheat-sheet * Removed obsolete comment --- source/blender/editors/animation/anim_draw.c | 1 - source/blender/editors/armature/poselib.c | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'source') diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 9863006308e..2dc4aa09407 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -340,7 +340,6 @@ short ANIM_headerUI_standard_buttons (const bContext *C, bDopeSheet *ads, uiBloc xco += 5; /* datatype based - only available datatypes are shown */ - // TODO: only show the datablocks which exist uiBlockBeginAlign(block); uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display Scene Animation"); uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(ads->filterflag), 0, 0, 0, 0, "Display World Animation"); 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) { -- cgit v1.2.3