xNode icon indicating copy to clipboard operation
xNode copied to clipboard

culledNodes in NodeEditorGUI.cs causes NullRefException and is never used

Open patrickklug opened this issue 3 years ago • 4 comments

see https://github.com/Siccity/xNode/commit/f04629a120bcda8a0fcb592b152375a48e878359#r62377093

patrickklug avatar Dec 22 '21 23:12 patrickklug

Is this an issue with your pull request?

Siccity avatar Dec 23 '21 06:12 Siccity

No, it's an issue in the main code base, I just commented on the exact line of code that shows the problem from the commit that added that line (via blame). If you look at the uses of culledNodes it only gets assigned to a list in the EventType.Layout phase but then gets checked for .Contains() when it's not in the layout phase. Even if that wouldn't be the case, culledNodes never gets used otherwise so probably won't do anything.

I just stumbled upon this today as I got the nullref exception repeatedly.

patrickklug avatar Dec 23 '21 07:12 patrickklug

oh! I see. Thank you for pointing it out :) Unfortunately I do not have time to look at it till after the holidays

Siccity avatar Dec 23 '21 12:12 Siccity

Is there a fix for this?

Ayfel avatar May 22 '23 23:05 Ayfel