Fix #24094: Multiresolution sculpt mode undo crash
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 2 Oct 2010 11:39:11 +0000 (11:39 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 2 Oct 2010 11:39:11 +0000 (11:39 +0000)
source/blender/blenloader/intern/readfile.c

index 6dfe673..f24de9c 100644 (file)
@@ -4100,8 +4100,10 @@ static void direct_link_object(FileData *fd, Object *ob)
        ob->gpulamp.first= ob->gpulamp.last= NULL;
        link_list(fd, &ob->pc_ids);
 
-       if(ob->sculpt)
+       if(ob->sculpt) {
                ob->sculpt= MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+               ob->sculpt->ob= ob;
+       }
 }
 
 /* ************ READ SCENE ***************** */