NULL check for pointcache. not sure this should be fixed elsewhere, commented this...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Apr 2010 17:57:17 +0000 (17:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Apr 2010 17:57:17 +0000 (17:57 +0000)
source/blender/blenkernel/intern/pointcache.c

index e14c46fd82a1eb91b95af9f33254e0d35f867f9c..3d02f1751741cb201e4ea4908da3189868062b1b 100644 (file)
@@ -1379,7 +1379,9 @@ static void ptcache_copy_data(void *from[], void *to[])
 {
        int i;
        for(i=0; i<BPHYS_TOT_DATA; i++) {
-               if(from[i])
+        /* note, durian file 03.4b_comp crashes if to[i] is not tested
+         * its NULL, not sure if this should be fixed elsewhere but for now its needed */
+               if(from[i] && to[i])
                        memcpy(to[i], from[i], ptcache_data_size[i]);
        }
 }