diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-01 09:23:59 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-01 09:23:59 +0300 |
commit | 81ab852ba9ac379bbed64eddcf7b7ea867455892 (patch) | |
tree | 26ec648687a561a3dfb2f721de2fb27acc955553 | |
parent | 26932c21ebca087ad7b71f1cfa2f7f9e16328a44 (diff) |
Bugfix #21262: Loading Alpha 0 project crash in Alpha 1
Old temp-pointers for File Browser instances were not being cleared on file load, resulting in crashes when trying to free temp screen layouts that contained file browser instance data.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e0ec3b26b52..fbf3c6f0ebe 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5125,6 +5125,18 @@ static void direct_link_screen(FileData *fd, bScreen *sc) // cl->line= newdataadr(fd, cl->line); } + else if(sl->spacetype==SPACE_FILE) { + SpaceFile *sfile= (SpaceFile *)sl; + + /* this sort of info is probably irrelevant for reloading... + * plus, it isn't saved to files yet! + */ + sfile->folders_prev= sfile->folders_next= NULL; + sfile->files= NULL; + sfile->layout= NULL; + sfile->op= NULL; + sfile->params= NULL; + } } sa->actionzones.first= sa->actionzones.last= NULL; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index be374d153cd..22fcd28ca00 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2080,6 +2080,7 @@ static void write_screens(WriteData *wd, ListBase *scrbase) write_curvemapping(wd, sima->cumap); } else if(sl->spacetype==SPACE_IMASEL) { + // XXX: depreceated... do we still want to keep this? writestruct(wd, DATA, "SpaceImaSel", 1, sl); } else if(sl->spacetype==SPACE_TEXT) { |