Cleanup: Simplifying freeing node editor space data

This commit is contained in:
Hans Goudey
2023-10-20 20:31:08 +02:00
parent 2864c20302
commit f64ed2e963

View File

@@ -452,15 +452,8 @@ static SpaceLink *node_create(const ScrArea * /*area*/, const Scene * /*scene*/)
static void node_free(SpaceLink *sl)
{
SpaceNode *snode = (SpaceNode *)sl;
LISTBASE_FOREACH_MUTABLE (bNodeTreePath *, path, &snode->treepath) {
MEM_freeN(path);
}
if (snode->runtime) {
snode->runtime->linkdrag.reset();
MEM_delete(snode->runtime);
}
BLI_freelistN(&snode->treepath);
MEM_delete(snode->runtime);
}
/* spacetype; init callback */