fix for accessing invalid memory when loading a new file.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user