[Bf-committers] [#19229] 1 line fix resolves - segmentation Fault

Martin Frances martinfrances107 at hotmail.com
Sat Aug 15 23:33:54 CEST 2009


just cleared a segmentation fault error in blender 2.5

segmentation fault exits when touching psys->particles->boid

here is my patch 

Index: source/blender/blenloader/intern/readfile.c
--- source/blender/blenloader/intern/readfile.c (revision 22473)
+++ source/blender/blenloader/intern/readfile.c (working copy)
@@ -3094,7 +3094,7 @@
                        psys->flag &= ~PSYS_KEYED;

-               if(psys->particles->boid) {
+               if(psys->particles && psys->particles->boid) {
                        pa = psys->particles;
                        pa->boid = newdataadr(fd, pa->boid);
                        for(a=1,pa++; a<psys->totpart; a++, pa++)

please look a the two 'if' structures in the code above my fix I have just followed that template .. as the original coder intended!

I don't have commit access would someone review and commit for me ... thanks 


Celebrate a decade of Messenger with free winks, emoticons, display pics, and more.

More information about the Bf-committers mailing list