diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editipo.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index dab2a0398b7..81a4a37581f 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -2200,8 +2200,12 @@ static void *get_context_ipo_poin(ID *id, int blocktype, char *actname, IpoCurve Object *ob= (Object *)id; bPoseChannel *pchan= get_pose_channel(ob->pose, actname); - *vartype= IPO_FLOAT; - return get_pchan_ipo_poin(pchan, icu->adrcode); + if(pchan) { + *vartype= IPO_FLOAT; + return get_pchan_ipo_poin(pchan, icu->adrcode); + } + else + return NULL; } return NULL; } @@ -4208,7 +4212,7 @@ void del_ipo(int need_check) bezt= ei->icu->bezt; for(a=0; a<ei->icu->totvert; a++) { if( BEZSELECTED(bezt) ) { - memcpy(bezt, bezt+1, (ei->icu->totvert-a-1)*sizeof(BezTriple)); + memmove(bezt, bezt+1, (ei->icu->totvert-a-1)*sizeof(BezTriple)); ei->icu->totvert--; a--; event= 1; @@ -5665,7 +5669,7 @@ void delete_icu_key(IpoCurve *icu, int index, short do_recalc) return; /* Delete this key */ - memcpy(&icu->bezt[index], &icu->bezt[index+1], sizeof(BezTriple)*(icu->totvert-index-1)); + memmove(&icu->bezt[index], &icu->bezt[index+1], sizeof(BezTriple)*(icu->totvert-index-1)); icu->totvert--; /* recalc handles - only if it won't cause problems */ @@ -5687,7 +5691,7 @@ void delete_ipo_keys(Ipo *ipo) /* Delete selected BezTriples */ for (i=0; i<icu->totvert; i++) { if (icu->bezt[i].f2 & SELECT) { - memcpy(&icu->bezt[i], &icu->bezt[i+1], sizeof(BezTriple)*(icu->totvert-i-1)); + memmove(&icu->bezt[i], &icu->bezt[i+1], sizeof(BezTriple)*(icu->totvert-i-1)); icu->totvert--; i--; } |