coverity issue CID: 484

Checker: REVERSE_INULL (help)
File: base/src/source/blender/imbuf/intern/anim.c
Function: IMB_anim_absolute
Description: Pointer "anim" dereferenced before NULL check

again moving init code after check to valid pointer.

Kent
This commit is contained in:
Kent Mein
2009-06-05 03:40:58 +00:00
parent 52b7c157a0
commit d585a201e1

View File

@@ -1046,10 +1046,11 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
char head[256], tail[256];
unsigned short digits;
int pic;
int filter_y = (anim->ib_flags & IB_animdeinterlace);
int filter_y;
if (anim == NULL) return(0);
filter_y = (anim->ib_flags & IB_animdeinterlace);
if (anim->curtype == 0) {
ibuf = anim_getnew(anim);
if (ibuf == NULL) {