From d585a201e1f1494888c75f4391b30ae7e60d65d7 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Fri, 5 Jun 2009 03:40:58 +0000 Subject: 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 --- source/blender/imbuf/intern/anim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 42fe47cc5e9..3e09eb5e306 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -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) { -- cgit v1.2.3