Two very easy crash fixes, one more proper pointer check, and a check

for a division by zero. Sorry... but i can't stand such known issues to be
in an official build. :)
This commit is contained in:
Ton Roosendaal
2005-10-12 20:36:11 +00:00
parent edad7a67b4
commit 88f6295dc6

View File

@@ -885,7 +885,7 @@ static void make_editipo(void)
rf= &(G.sipo->ipo->cur);
if(rf->xmin<rf->xmax && rf->ymin<rf->ymax) G.v2d->cur= *rf;
else ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
}
else {
ipo_default_v2d_cur(G.sipo->blocktype, &G.v2d->cur);
@@ -932,7 +932,7 @@ static void get_ipo_context(short blocktype, ID **from, Ipo **ipo, char *actname
}
}
else if(blocktype==ID_PO) {
if (ob && ob->action) {
if (ob && ob->action && ob->type==OB_ARMATURE) {
bPoseChannel *pchan= get_active_posechannel(ob);
*from= (ID *)ob;