remove some paranoid NULL checks, since the pointers are used already.
This commit is contained in:
@@ -187,12 +187,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
|
|||||||
double gamma_table[256];
|
double gamma_table[256];
|
||||||
double uv_table[256];
|
double uv_table[256];
|
||||||
float *destf = out->rect_float;
|
float *destf = out->rect_float;
|
||||||
float *src1f = ibuf1->rect_float;
|
float *src1f;
|
||||||
|
|
||||||
if (!ibuf1) return;
|
if (!ibuf1) return;
|
||||||
|
|
||||||
dest= (char *) out->rect;
|
dest= (char *) out->rect;
|
||||||
src1= (char *) ibuf1->rect;
|
src1= (char *) ibuf1->rect;
|
||||||
|
src1f= ibuf1->rect_float;
|
||||||
|
|
||||||
for (y = 0; y < 256; y++) {
|
for (y = 0; y < 256; y++) {
|
||||||
float v = 1.0 * y / 255;
|
float v = 1.0 * y / 255;
|
||||||
|
@@ -120,12 +120,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
|
|||||||
float gamma_table[256];
|
float gamma_table[256];
|
||||||
float uv_table[256];
|
float uv_table[256];
|
||||||
float *destf = out->rect_float;
|
float *destf = out->rect_float;
|
||||||
float *src1f = ibuf1->rect_float;
|
float *src1f;
|
||||||
|
|
||||||
if (!ibuf1) return;
|
if (!ibuf1) return;
|
||||||
|
|
||||||
dest= (char *) out->rect;
|
dest= (char *) out->rect;
|
||||||
src1= (char *) ibuf1->rect;
|
src1= (char *) ibuf1->rect;
|
||||||
|
src1f= ibuf1->rect_float;
|
||||||
|
|
||||||
for (y = 0; y < 256; y++) {
|
for (y = 0; y < 256; y++) {
|
||||||
float v = 1.0 * y / 255;
|
float v = 1.0 * y / 255;
|
||||||
|
@@ -199,7 +199,6 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
|
|||||||
static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
|
static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
|
||||||
{
|
{
|
||||||
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
|
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
|
||||||
Mesh *me= (ob)? ob->data: NULL;
|
|
||||||
|
|
||||||
if(!ob) {
|
if(!ob) {
|
||||||
cddm->pbvh= NULL;
|
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
|
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 */
|
that this is actually for, to support a pbvh on a modified mesh */
|
||||||
if(!cddm->pbvh && ob->type == OB_MESH) {
|
if(!cddm->pbvh && ob->type == OB_MESH) {
|
||||||
|
Mesh *me= ob->data;
|
||||||
cddm->pbvh = BLI_pbvh_new();
|
cddm->pbvh = BLI_pbvh_new();
|
||||||
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
|
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
|
||||||
BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
|
BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
|
||||||
|
@@ -95,8 +95,6 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
|
|||||||
MetaBall *mball = (MetaBall*)obedit->data;
|
MetaBall *mball = (MetaBall*)obedit->data;
|
||||||
MetaElem *ml;
|
MetaElem *ml;
|
||||||
|
|
||||||
if(!obedit) return NULL;
|
|
||||||
|
|
||||||
/* Deselect all existing metaelems */
|
/* Deselect all existing metaelems */
|
||||||
ml= mball->editelems->first;
|
ml= mball->editelems->first;
|
||||||
while(ml) {
|
while(ml) {
|
||||||
|
@@ -272,8 +272,6 @@ static void cache_voxeldata(struct Render *re, Tex *tex)
|
|||||||
int curframe;
|
int curframe;
|
||||||
char path[sizeof(vd->source_path)];
|
char path[sizeof(vd->source_path)];
|
||||||
|
|
||||||
if (!vd) return;
|
|
||||||
|
|
||||||
/* only re-cache if dataset needs updating */
|
/* only re-cache if dataset needs updating */
|
||||||
if ((vd->flag & TEX_VD_STILL) || (vd->cachedframe == re->r.cfra))
|
if ((vd->flag & TEX_VD_STILL) || (vd->cachedframe == re->r.cfra))
|
||||||
if (vd->ok) return;
|
if (vd->ok) return;
|
||||||
|
Reference in New Issue
Block a user