fix for accessing invalid memory when loading a new file.

This commit is contained in:
2009-12-25 23:50:35 +00:00
parent b0b3e27471
commit 99e3423a50

View File

@@ -249,7 +249,12 @@ void free_scene(Scene *sce)
/* do not free objects! */
if(sce->gpd) {
#if 0 // removed since this can be invalid memory when freeing everything
// since the grease pencil data is free'd before the scene.
// since grease pencil data is not (yet?), shared between objects
// its probably safe not to do this, some save and reload will free this.
sce->gpd->id.us--;
#endif
sce->gpd= NULL;
}