Fixed a couple of null issues spotted by coverity.
authorKent Mein <mein@cs.umn.edu>
Fri, 27 Mar 2009 16:27:48 +0000 (16:27 +0000)
committerKent Mein <mein@cs.umn.edu>
Fri, 27 Mar 2009 16:27:48 +0000 (16:27 +0000)
CIDS: 42 and 470

Kent

source/blender/blenkernel/intern/anim.c

index 731c2a18c55cfde25e4175e3196d7b3570a8f1b5..87d7bfc4853e3ff22ac8b9809d80387de8f92c3a 100644 (file)
@@ -223,14 +223,16 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir)        /* returns OK
        cu= ob->data;
        if(cu->path==NULL || cu->path->data==NULL) {
                printf("no path!\n");
+               return 0;
        }
        path= cu->path;
        fp= path->data;
        
        /* test for cyclic */
        bl= cu->bev.first;
+       if (!bl) return 0;
        if (!bl->nr) return 0;
-       if(bl && bl->poly> -1) cycl= 1;
+       if(bl->poly> -1) cycl= 1;
 
        ctime *= (path->len-1);