Crash in hovering over the menu "Pose -> Poselib" sub-items.
NULL context passed on to function and read before the test.
This commit is contained in:
Ton Roosendaal
2011-02-19 18:53:08 +00:00
parent 9d81d5f7ac
commit 43d362fcc8

View File

@@ -470,10 +470,11 @@ void POSELIB_OT_pose_add (wmOperatorType *ot)
/* ----- */
/* can be called with C == NULL */
static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
{
Object *ob= get_poselib_object(C);
bAction *act= (ob) ? ob->poselib : NULL;
Object *ob;
bAction *act;
TimeMarker *marker;
EnumPropertyItem *item= NULL, item_tmp= {0};
int totitem= 0;
@@ -483,6 +484,9 @@ static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUS
return DummyRNA_DEFAULT_items;
}
ob= get_poselib_object(C);
act= (ob) ? ob->poselib : NULL;
/* check that the action exists */
if (act) {
/* add each marker to the list */