I am experimenting with sorting and filtering the Outliner, and my altered Blender has suffered an exception:
Exception thrown: read access violation.
te was 0xFFFFFFFFFFFFFFCF
------------------My questions are ----------------------------
Question: Why is te becoming NULL at function
bool outliner_is_collection_tree_element(const TreeElement *te)
?
Question: What is the proper way to duplicate the soops->tree and then use the duplicate in place of the current soops->tree ?
-------------Here is the explanation of my code AND my actual code I have written(note that I believe that all of my code below is simple and straightforward)-----------------
In my code I duplicate the soops->tree
that is within function outliner_build_tree()
. I ultimately use BLI_duplicatelist()
to duplicate inside my function duplicate_tree()
.
I then free the original soops->tree
using my function outliner_free_source_tree()
Then I attempt to replace the original with the allocated duplicated ListBase tree_dup;
by assigning the first/last members to soops->tree
soops->tree.first = tree_dup.first;
soops->tree.last = tree_dup.last;
THE CODE: