Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-06 16:27:14 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-06 16:27:14 +0400
commitad7a74f58dfbcaf370630e88efa86e3f9217cfce (patch)
tree755248ee0f1ab6fe590d28c7288a8ac5934a3cba /source/blender/blenloader
parent5282c4d0030add3301eba64203ec26b14fee5264 (diff)
Another correction to svn rev56509
Initial fix was not fully working, because faulty edge shared the same address as screen area. This lead to screen freeing issues -- double free (which was supressed by guarded allocation actually) but also freed memory access when iterating via edges to free them. Solved by a small hack which removes edges with bad vertices from edges list. This prevents double-free and freed memory access cased by corrupted files we're currently fixing. In other cases this tweak is likely be harmless -- in worst case scenario it'll lead to small memory leak, which is not as much lethal as freed memory access.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 752f66c96a4..3b9ae245661 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6176,6 +6176,7 @@ static bool direct_link_screen(FileData *fd, bScreen *sc)
if (se->v1 == NULL) {
printf("Error reading Screen %s... removing it.\n", sc->id.name+2);
+ BLI_remlink(&sc->edgebase, se);
wrong_id = true;
}
}