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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user