Fixed bug #5742, Crash on sculpt mode. This bug was triggered when adding a new object while already in sculpt mode. Sculpt mode wasn't being deactived on cameras, lamps, etc. Fixed in add_object_draw() by turning off G_SCULPTMODE, also by adding a check in sculpt_init_session() to be sure any previous session is free'd before making a new one.

This commit is contained in:
2007-01-18 07:04:08 +00:00
parent 33e4391136
commit 21f431047f
2 changed files with 4 additions and 1 deletions

View File

@@ -211,8 +211,11 @@ void sculptmode_init(Scene *sce)
}
void sculptmode_undo_init();
void sculptmode_free_session(Scene *);
void sculpt_init_session()
{
if(sculpt_data()->session)
sculptmode_free_session(G.scene);
sculpt_data()->session= MEM_callocN(sizeof(SculptSession), "SculptSession");
sculptmode_undo_init();
}