diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-16 19:28:43 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-16 19:28:43 +0400 |
commit | 863e661cc363067fbbe39f4e876e35268bb97ab8 (patch) | |
tree | a7abeca17632a30ebf08d38390e7d6bdd6c48f87 /source/blender/editors/sculpt_paint | |
parent | 299adde803de5f0bb6f5fd7cc95ea9e61219aea2 (diff) |
Bugfix: sculpting with a multires modifier at level 1 would crash.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 4f667ab7976..c4c7f436f12 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1107,7 +1107,7 @@ char sculpt_modifiers_active(Object *ob) it's the last modifier on the stack and it is not on the first level */ static struct MultiresModifierData *sculpt_multires_active(Object *ob) { - ModifierData *md; + ModifierData *md, *nmd; for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) { if(md->type == eModifierType_Multires) { @@ -1115,12 +1115,11 @@ static struct MultiresModifierData *sculpt_multires_active(Object *ob) /* Check if any of the modifiers after multires are active * if not it can use the multires struct */ - for (md= md->next; md; md= md->next) { - if(md->mode & eModifierMode_Realtime) - return NULL; - } + for (nmd= md->next; nmd; nmd= nmd->next) + if(nmd->mode & eModifierMode_Realtime) + break; - if(mmd->lvl != 1) + if(!nmd && mmd->lvl != 1) return mmd; } } |