diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-31 15:37:30 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-31 15:37:30 +0300 |
commit | 803e9a290886f218de5fa282ce6feca633c894d9 (patch) | |
tree | 0efaccac4cf61f4009383a09db6e83c413af64e1 /source/blender/blenloader | |
parent | 683694b520f9eee057d754df279411f51bac1c7d (diff) |
Bugfix #25427
Serious *bad* crash in undo introduced by commit Janne dec 21st.
Time window now stores some kind of cache for fluids/cloth, but
it's pointing (in SpaceTime) to data inside Objects. (Not ID).
That's really not allowed... this commit fixes crashes but the
cache code really needs to be redesigned. I'm also afraid this
crash is going to frustrate everyone using physics...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 0dfdd46d17b..fdac9753cdd 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4984,6 +4984,15 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) ssound->sound= restore_pointer_by_name(newmain, (ID *)ssound->sound, 1); } + else if(sl->spacetype==SPACE_TIME) { + SpaceTime *stime= (SpaceTime *)sl; + SpaceTimeCache *stc; + + /* XXX bad linking of internal object data to space */ + for (stc= stime->caches.first; stc; stc=stc->next) + MEM_freeN(stc->array); + BLI_freelistN(&stime->caches); + } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; |