Closed aphex- closed 8 years ago
This seems to happen in some special cases, everytime I've encountered this I tried to fix the cause instead but there seems to be an unpredictable amount of occasions where this happens...
Though there are many more cases where the nodes get accessed, so instead of adding a check in each case, I'd propose to remove the node list entry before anything gets accessed (in the drawing function after background and scaling but before input and drawing). If such a null entry was found, we also need to check if the NodeKnobs that belonged to the node are still left somewhere, referencing a null body, which would also cause an error. So we'd need to iterate over each node and it knobs if such a null entry was found (not every time).
Can you add that while you're at it? That's be more solid I hope:)
My solution is just a hotfix. I thought it would be a good idea to have it fixed to avoid crashes for new users.I would love to fix the cause of it but I am very new to this project. I do not know how much time I will spend to understand the internals. Wouldn't it be the best to avoid to set null entries instead of cleaning the list at some point? Anyway.. like I said I am new to this :)
Ok I can make an additional fix for this later:)
For some reason I get a NullReferenceException if I start Unity with the Node_Editor. A node in curNodeCanvas.nodes seems to be null. This leads to a frozen node window.
Unity 5.3.4f1 Personal (Mac)
To fix this issue I checked for null on the nodes.