forked from bartvdbraak/blender
Fixed bug #5592, change from sculpt mode to edit mode crashes 2.43RC1 on OsX Intel. Fix was to check that undo data is taken from the correct object.
This commit is contained in:
parent
31e4149c44
commit
6643cc53d9
@ -52,7 +52,8 @@ extern void undo_editmode_menu(void); // history menu
|
||||
extern struct uiBlock *editmode_undohistorymenu(void *arg_unused);
|
||||
|
||||
/* Hack to avoid multires undo data taking up insane amounts of memory */
|
||||
void *undo_editmode_get_prev();
|
||||
struct Object;
|
||||
void *undo_editmode_get_prev(struct Object *ob);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1918,7 +1918,7 @@ static void *editMesh_to_undoMesh(void)
|
||||
|
||||
{
|
||||
Multires *mr= get_mesh(G.obedit)->mr;
|
||||
UndoMesh *prev= undo_editmode_get_prev();
|
||||
UndoMesh *prev= undo_editmode_get_prev(G.obedit);
|
||||
|
||||
um->mru= NULL;
|
||||
|
||||
|
@ -340,9 +340,9 @@ uiBlock *editmode_undohistorymenu(void *arg_unused)
|
||||
return block;
|
||||
}
|
||||
|
||||
void *undo_editmode_get_prev()
|
||||
void *undo_editmode_get_prev(Object *ob)
|
||||
{
|
||||
UndoElem *ue= undobase.last;
|
||||
if(ue && ue->prev) return ue->prev->undodata;
|
||||
if(ue && ue->prev && ue->prev==ob) return ue->prev->undodata;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user