remove some paranoid NULL checks, since the pointers are used already.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 19:05:10 +0000 (19:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 19:05:10 +0000 (19:05 +0000)
release/plugins/sequence/color-correction-hsv.c
release/plugins/sequence/color-correction-yuv.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/editors/metaball/mball_edit.c
source/blender/render/intern/source/voxeldata.c

index 120ca76bbe721d95175e2cec9ef42c8adc90bd61..cff2f1aad82cb0cf05c78461d086a4a673abc3f8 100644 (file)
@@ -187,12 +187,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
        double gamma_table[256];
        double uv_table[256];
        float *destf = out->rect_float;
-       float *src1f = ibuf1->rect_float;
+       float *src1f;
        
        if (!ibuf1) return;
 
        dest= (char *) out->rect;
        src1= (char *) ibuf1->rect;
+       src1f= ibuf1->rect_float;
 
        for (y = 0; y < 256; y++) {
                float v = 1.0 * y / 255;
index 721cadb07ce0a139d077035fe1e937138e2e3c56..b80489f3b0bbf5f95bcb142e46d73a51b5300a46 100644 (file)
@@ -120,12 +120,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
        float gamma_table[256];
        float uv_table[256];
        float *destf = out->rect_float;
-       float *src1f = ibuf1->rect_float;
+       float *src1f;
        
        if (!ibuf1) return;
 
        dest= (char *) out->rect;
        src1= (char *) ibuf1->rect;
+       src1f= ibuf1->rect_float;
 
        for (y = 0; y < 256; y++) {
                float v = 1.0 * y / 255;
index cd0872807a0e7feaabb3735b1044df4c3d19f8fc..d6c91c3c908db8a60071b565d6004bbc66d720be 100644 (file)
@@ -199,7 +199,6 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
 static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
 {
        CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
-       Mesh *me= (ob)? ob->data: NULL;
 
        if(!ob) {
                cddm->pbvh= NULL;
@@ -217,6 +216,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
           this derivedmesh is just original mesh. it's the multires subsurf dm
           that this is actually for, to support a pbvh on a modified mesh */
        if(!cddm->pbvh && ob->type == OB_MESH) {
+               Mesh *me= ob->data;
                cddm->pbvh = BLI_pbvh_new();
                cddm->pbvh_draw = can_pbvh_draw(ob, dm);
                BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
index 1170a910c92de73bd39df78b49fe15fb34fd01bd..a9a673fdf20d9cfb52dfb84f9d13e26a049c2166 100644 (file)
@@ -95,8 +95,6 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
        MetaBall *mball = (MetaBall*)obedit->data;
        MetaElem *ml;
 
-       if(!obedit) return NULL;
-
        /* Deselect all existing metaelems */
        ml= mball->editelems->first;
        while(ml) {
index 0ccf905a85189850c1fc2ddcf9e56b7091fd7234..581dedfe655f33a9f84f7a51421234d0ea3abe33 100644 (file)
@@ -272,8 +272,6 @@ static void cache_voxeldata(struct Render *re, Tex *tex)
        int curframe;
        char path[sizeof(vd->source_path)];
        
-       if (!vd) return;
-       
        /* only re-cache if dataset needs updating */
        if ((vd->flag & TEX_VD_STILL) || (vd->cachedframe == re->r.cfra))
                if (vd->ok) return;