forked from bartvdbraak/blender
Bug fix, irc report.
Menu Help -> Operator Cheat Sheet crashed, calling function with NULL context.
This commit is contained in:
parent
f2ab4dd6a7
commit
24685d3967
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user