From 141be02c90cbdb2f1d8cd2702ea79e3b3e9590f7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Apr 2011 10:50:56 +0000 Subject: 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. --- source/blender/blenloader/intern/readfile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenloader/intern') 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->lasthitnentries-1) { OldNew *entry= &onm->entries[++onm->lasthit]; -- cgit v1.2.3