diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-25 19:05:26 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-25 19:05:26 +0300 |
commit | 24685d39670b28fad4a4f28fe43b8cbd04fb3c2e (patch) | |
tree | 1c38c80373ce4a98f9fa13622d1b9af5f687fc2e /source/blender/editors/armature/poselib.c | |
parent | f2ab4dd6a72b08d2d965559d53bd9319b8381fa3 (diff) |
Bug fix, irc report.
Menu Help -> Operator Cheat Sheet crashed, calling function with NULL context.
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 5 |
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 |