fix for unlikely crash if smoke collision data couldn't be read. (pointer was used...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 1 Oct 2012 15:26:48 +0000 (15:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 1 Oct 2012 15:26:48 +0000 (15:26 +0000)
source/blender/blenloader/intern/readfile.c

index 38d6254..80943c2 100644 (file)
@@ -4368,13 +4368,14 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
                                smd->flow = NULL;
                                smd->domain = NULL;
                                smd->coll = newdataadr(fd, smd->coll);
-                               smd->coll->smd = smd;
                                if (smd->coll) {
+                                       smd->coll->smd = smd;
                                        smd->coll->points = NULL;
                                        smd->coll->numpoints = 0;
                                }
-                               else
+                               else {
                                        smd->type = 0;
+                               }
                        }
                }
                else if (md->type == eModifierType_DynamicPaint) {