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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user