diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-20 14:50:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-20 14:50:56 +0400 |
commit | 141be02c90cbdb2f1d8cd2702ea79e3b3e9590f7 (patch) | |
tree | bc22cfc8129daab2fb8c9af67a7f6e580e5480bc /source/blender | |
parent | a4ebe848d93af22956386a980febb9726b654f0e (diff) |
tested with a very large blend file 600mb. - from [#27002].
without this check the file took 4m, 40sec to load, with the check it takes ~3.3sec.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a87d993bc15..1673cbf8458 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -290,6 +290,8 @@ static void *oldnewmap_lookup_and_inc(OldNewMap *onm, void *addr) { int i; + if(addr==NULL) return NULL; + if (onm->lasthit<onm->nentries-1) { OldNew *entry= &onm->entries[++onm->lasthit]; |