diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-03-25 15:08:14 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-03-25 15:08:14 +0400 |
commit | b58ffcce86f6767baceb728a6dba6e27b648b3d1 (patch) | |
tree | 6eb982dd35526a8c720606a8bec071124a2fb762 /source/blender | |
parent | 72a37146952426be0a0d8baf6221dee58b06c84e (diff) |
Fix #34758, another Crash with NodeGroup. Took a while to get to the bottom, but the root of the issue was that nested node groups (groups inside other groups) were ungrouped ("inlined") repeatedly. This lead to preview operations being added to the same group more than once, and the redundant preview operations (beside working on the same preview buffer) did not get their correct resolution set. This in turn would then lead to previews writing beyond allocated size and causing corrupted memory + crash.
Simple fix: don't expand node groups more than once.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp index ad396e053f2..eb0c9cbdf11 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp @@ -69,8 +69,11 @@ void ExecutionSystemHelper::addbNodeTree(ExecutionSystem &system, int nodes_star nodelink = nodelink->next; } - /* Expand group nodes */ - for (unsigned int i = nodes_start; i < nodes.size(); ++i) { + /* Expand group nodes + * Only go up to nodes_end, to avoid ungrouping nested node groups repeatedly. + */ + int nodes_end = nodes.size(); + for (unsigned int i = nodes_start; i < nodes_end; ++i) { Node *execnode = nodes[i]; if (execnode->isGroupNode()) { GroupNode *groupNode = (GroupNode *)execnode; |