remove some paranoid NULL checks, since the pointers are used already.

This commit is contained in:
Campbell Barton 2010-12-17 19:05:10 +00:00
parent b48f7901d2
commit fd90685a48
5 changed files with 5 additions and 7 deletions

View 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;

View 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;

View 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,

View 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) {

View 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;