diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2006-12-03 23:35:35 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2006-12-03 23:35:35 +0300 |
commit | dde6444d51a83dff9bad803cbf58dedb2222691f (patch) | |
tree | 1867557ea60d19b2b2230fec7adca7cfe2fe35f1 /source/blender/src/sculptmode.c | |
parent | d7aaa84dd96bbf30307ee25a2c4d5a22bff8b378 (diff) |
Sculptmode should check for existance of undo data before undo/redo in case user loads a file with sculptmode on and presses undo/redo before doing a sculpt action.
Diffstat (limited to 'source/blender/src/sculptmode.c')
-rw-r--r-- | source/blender/src/sculptmode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c index 5198c99e0b0..558f29b54f1 100644 --- a/source/blender/src/sculptmode.c +++ b/source/blender/src/sculptmode.c @@ -432,7 +432,7 @@ void sculptmode_undo() { SculptUndo *su= G.scene->sculptdata.undo; - if(su->cur->prev) + if(su && su->cur->prev) sculptmode_undo_update(su->cur->prev); } @@ -440,7 +440,7 @@ void sculptmode_redo() { SculptUndo *su= G.scene->sculptdata.undo; - if(su->cur->next) + if(su && su->cur->next) sculptmode_undo_update(su->cur->next); } @@ -451,6 +451,8 @@ void sculptmode_undo_menu() DynStr *ds= BLI_dynstr_new(); char *menu; + if(!su) return; + BLI_dynstr_append(ds, "Sculpt Mode Undo History %t"); for(sus= su->steps.first; sus; sus= sus->next) { BLI_dynstr_append(ds, "|"); |