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:
authorTon Roosendaal <ton@blender.org>2007-01-29 22:26:11 +0300
committerTon Roosendaal <ton@blender.org>2007-01-29 22:26:11 +0300
commit25d017b338dc109b64a3cf043a5e503cd805b6ae (patch)
treed87a16712a1d4ef10cb41ae1fd1ff64f15594c9c /source/blender/src/sculptmode.c
parent1f35fd7929fafe80e1768d99a80ec903024ec015 (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.c8
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())