* Fixed crash with operator cheat-sheet
authorJoshua Leung <aligorith@gmail.com>
Wed, 14 Oct 2009 00:01:34 +0000 (00:01 +0000)
committerJoshua Leung <aligorith@gmail.com>
Wed, 14 Oct 2009 00:01:34 +0000 (00:01 +0000)
* Removed obsolete comment

source/blender/editors/animation/anim_draw.c
source/blender/editors/armature/poselib.c

index 9863006308ef8d82a3d87999357c16f6075a1de0..2dc4aa09407d357760932daf7608dc004dab7c88 100644 (file)
@@ -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");
index b06c7286859c9b6be0bd678cf909c3acb7df2947..d6f937575052ee67aee392ed78184cc215c314a6 100644 (file)
@@ -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) {