Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-11 06:18:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-11 06:18:27 +0400
commita0ae47f06c6232a91202bd06ea173b955735596b (patch)
treed0c928e2167037eec5f01277ebe7dc0885168d59 /source/blender/blenkernel/intern/dynamicpaint.c
parent652f64762c31bd1cfcac7ae05f184b70713b2034 (diff)
add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 06807dfcbad..f47ac641cf9 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -2595,7 +2595,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG;
char output_file[FILE_MAX];
- if (!sData || !sData->type_data) { setError(surface->canvas, "Image save failed: Invalid surface."); return; }
+ if (!sData->type_data) { setError(surface->canvas, "Image save failed: Invalid surface."); return; }
/* if selected format is openexr, but current build doesnt support one */
#ifndef WITH_OPENEXR
if (format == R_IMF_IMTYPE_OPENEXR) format = R_IMF_IMTYPE_PNG;
@@ -4800,7 +4800,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
PaintBakeData *bData = sData->bData;
DynamicPaintCanvasSettings *canvas = surface->canvas;
int ret = 1;
- if (!sData || sData->total_points < 1) return 0;
+ if (sData->total_points < 1) return 0;
dynamicPaint_surfacePreStep(surface, timescale);
/*
@@ -4875,7 +4875,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
/* Apply brush on the surface depending on it's collision type */
/* Particle brush: */
if (brush->collision == MOD_DPAINT_COL_PSYS) {
- if (brush && brush->psys && brush->psys->part && brush->psys->part->type == PART_EMITTER &&
+ if (brush->psys && brush->psys->part && brush->psys->part->type == PART_EMITTER &&
psys_check_enabled(brushObj, brush->psys))
{