[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34996] trunk/blender/source/blender/ editors/armature/poselib.c: Bugfix #26150

Ton Roosendaal ton at blender.org
Sat Feb 19 19:53:08 CET 2011


Revision: 34996
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34996
Author:   ton
Date:     2011-02-19 18:53:08 +0000 (Sat, 19 Feb 2011)
Log Message:
-----------
Bugfix #26150

Crash in hovering over the menu "Pose -> Poselib" sub-items.
NULL context passed on to function and read before the test.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/armature/poselib.c

Modified: trunk/blender/source/blender/editors/armature/poselib.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poselib.c	2011-02-19 17:18:38 UTC (rev 34995)
+++ trunk/blender/source/blender/editors/armature/poselib.c	2011-02-19 18:53:08 UTC (rev 34996)
@@ -470,10 +470,11 @@
 
 /* ----- */
 
+/* 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 @@
 		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 */




More information about the Bf-blender-cvs mailing list