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:
-rw-r--r--source/blender/editors/armature/poselib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index da1f2ba4986..13a8cef3d07 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -141,14 +141,17 @@ static TimeMarker *poselib_get_active_pose (bAction *act)
}
/* Get object that Pose Lib should be found on */
+ /* XXX C can be zero */
static Object *get_poselib_object (bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *sa;
/* sanity check */
if (C == NULL)
return NULL;
+ sa = CTX_wm_area(C);
+
if (sa && (sa->spacetype == SPACE_BUTS))
return CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else