forked from bartvdbraak/blender
Bugfix #5305
Sculpt mode crasher; after deleting object and quitting blender. Was freed memory hanging in sculpt undo data.
This commit is contained in:
parent
f554aa8a35
commit
34f592af85
@ -260,10 +260,6 @@ void delete_obj(int ok)
|
|||||||
Base *base;
|
Base *base;
|
||||||
int islamp= 0;
|
int islamp= 0;
|
||||||
|
|
||||||
/* used for global delete only*/
|
|
||||||
Scene *scene;
|
|
||||||
Base *base_other;
|
|
||||||
|
|
||||||
if(G.obedit) return;
|
if(G.obedit) return;
|
||||||
if(G.scene->id.lib) return;
|
if(G.scene->id.lib) return;
|
||||||
|
|
||||||
@ -290,6 +286,9 @@ void delete_obj(int ok)
|
|||||||
if(base->object->vnode) b_verse_delete_object(base->object);
|
if(base->object->vnode) b_verse_delete_object(base->object);
|
||||||
#endif
|
#endif
|
||||||
if (ok==2) {
|
if (ok==2) {
|
||||||
|
Scene *scene;
|
||||||
|
Base *base_other;
|
||||||
|
|
||||||
for (scene= G.main->scene.first; scene; scene= scene->id.next) {
|
for (scene= G.main->scene.first; scene; scene= scene->id.next) {
|
||||||
if (scene != G.scene && !(scene->id.lib)) {
|
if (scene != G.scene && !(scene->id.lib)) {
|
||||||
base_other= object_in_scene( base->object, scene );
|
base_other= object_in_scene( base->object, scene );
|
||||||
|
@ -296,6 +296,7 @@ void sculptmode_undo_free(Scene *sce)
|
|||||||
sculptmode_undo_free_link(sus);
|
sculptmode_undo_free_link(sus);
|
||||||
BLI_freelistN(&sce->sculptdata.undo->steps);
|
BLI_freelistN(&sce->sculptdata.undo->steps);
|
||||||
MEM_freeN(sce->sculptdata.undo);
|
MEM_freeN(sce->sculptdata.undo);
|
||||||
|
sce->sculptdata.undo= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sculptmode_undo_push(char *str, SculptUndoType type)
|
void sculptmode_undo_push(char *str, SculptUndoType type)
|
||||||
|
Loading…
Reference in New Issue
Block a user