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>2013-07-23 12:28:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 12:28:28 +0400
commit28299d98fb93e87b2322d0533395254e2792a86f (patch)
treeb32d6cff39d1cc5f31bfa1201b623dd24dde04ff /source/blender/modifiers/intern/MOD_ocean.c
parent4a999f9e96965bd4aa45ce4cdd5c225bbf901226 (diff)
svn merge ^/trunk/blender -c58374 -c58406 -c58422 -c58427 -c58436 -c58440 -c58441 -c58463 -c58504 -c58509 -c58512 -c58513 -c58514 -c58516 -c58520 -c58532 -c58534v2.68a
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ocean.c')
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index 7c9a88622ed..5fdd17b5167 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -426,6 +426,11 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
const float size_co_inv = 1.0f / (omd->size * omd->spatial_size);
+ /* can happen in when size is small, avoid bad array lookups later and quit now */
+ if (!finite(size_co_inv)) {
+ return derivedData;
+ }
+
/* update modifier */
if (omd->refresh & MOD_OCEAN_REFRESH_ADD)
omd->ocean = BKE_add_ocean();
@@ -531,7 +536,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
}
}
- #undef OCEAN_CO
+#undef OCEAN_CO
return dm;
}
@@ -552,8 +557,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
{
DerivedMesh *result;
- CDDM_calc_normals(derivedData);
-
result = doOcean(md, ob, derivedData, 0);
if (result != derivedData)