diff options
author | Ton Roosendaal <ton@blender.org> | 2007-01-29 22:26:11 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-01-29 22:26:11 +0300 |
commit | 25d017b338dc109b64a3cf043a5e503cd805b6ae (patch) | |
tree | d87a16712a1d4ef10cb41ae1fd1ff64f15594c9c /source/blender/src/sculptmode.c | |
parent | 1f35fd7929fafe80e1768d99a80ec903024ec015 (diff) |
bugfix #5872
Crash when in sculptmode, add armature, switch to object mode.
Diffstat (limited to 'source/blender/src/sculptmode.c')
-rw-r--r-- | source/blender/src/sculptmode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c index 97d47b079ca..80b435cd7de 100644 --- a/source/blender/src/sculptmode.c +++ b/source/blender/src/sculptmode.c @@ -2045,11 +2045,15 @@ void sculpt() void set_sculptmode() { if(G.f & G_SCULPTMODE) { + Mesh *me= get_mesh(OBACT); + G.f &= ~G_SCULPTMODE; sculptmode_free_session(G.scene); - if(get_mesh(OBACT)->pv) sculptmode_pmv_off(get_mesh(OBACT)); - } else { + if(me && me->pv) + sculptmode_pmv_off(me); + } + else { G.f |= G_SCULPTMODE; if(!sculptmode_brush()) |