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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-08-16 19:19:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-08-16 19:19:52 +0300
commit1e4e140efb43d05ff3361694f429338d2b90f140 (patch)
treeb57921ce1c2ba9d2c48330c7696de57820dcbddf /source/blender/blenkernel/intern/smoke.c
parent64a6a86d57ee0c8810b7738bc42950c336d82952 (diff)
More fixes from coverity report.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 3fc72628c97..f622d541f3a 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -3051,9 +3051,15 @@ float smoke_get_velocity_at(struct Object *ob, float position[3], float velocity
int smoke_get_data_flags(SmokeDomainSettings *sds)
{
int flags = 0;
- if (smoke_has_heat(sds->fluid)) flags |= SM_ACTIVE_HEAT;
- if (smoke_has_fuel(sds->fluid)) flags |= SM_ACTIVE_FIRE;
- if (smoke_has_colors(sds->fluid)) flags |= SM_ACTIVE_COLORS;
+
+ if (sds->fluid) {
+ if (smoke_has_heat(sds->fluid))
+ flags |= SM_ACTIVE_HEAT;
+ if (smoke_has_fuel(sds->fluid))
+ flags |= SM_ACTIVE_FIRE;
+ if (smoke_has_colors(sds->fluid))
+ flags |= SM_ACTIVE_COLORS;
+ }
return flags;
}