tested with a very large blend file 600mb. - from [#27002].
authorCampbell Barton <ideasman42@gmail.com>
Wed, 20 Apr 2011 10:50:56 +0000 (10:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Apr 2011 10:50:56 +0000 (10:50 +0000)
without this check the file took 4m, 40sec to load, with the check it takes ~3.3sec.

source/blender/blenloader/intern/readfile.c

index a87d993bc15b370597901f325334fe0dc11be8aa..1673cbf8458f55909505077a6de39dfa35ab4304 100644 (file)
@@ -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];