Merge with trunk r39750
[blender.git] / source / blender / blenloader / intern / writefile.c
index bba5ff666581dd381e97719c223d077f59e0253b..4ee050b57f4066d1705647a226d56d554e020f58 100644 (file)
@@ -868,10 +868,12 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
                        for(; dw; dw=dw->next) {
                                /* update indices */
                                dw->index = 0;
-                               go = part->dup_group->gobject.first;
-                               while(go && go->ob != dw->ob) {
-                                       go=go->next;
-                                       dw->index++;
+                               if(part->dup_group) { /* can be NULL if lining fails or set to None */
+                                       go = part->dup_group->gobject.first;
+                                       while(go && go->ob != dw->ob) {
+                                               go=go->next;
+                                               dw->index++;
+                                       }
                                }
                                writestruct(wd, DATA, "ParticleDupliWeight", 1, dw);
                        }
@@ -2487,7 +2489,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
        fg.subversion= BLENDER_SUBVERSION;
        fg.minversion= BLENDER_MINVERSION;
        fg.minsubversion= BLENDER_MINSUBVERSION;
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
        {
                extern char build_rev[];
                fg.revision= atoi(build_rev);