Skip to content

Commit ddd07a5

Browse files
committed
fix: warn when encountering invalid node tree in dfs
1 parent 1ae5be0 commit ddd07a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ntp_operator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ def dfs(nt: NodeTree) -> None:
241241
Parameters:
242242
nt (NodeTree): current node tree in the dependency graph
243243
"""
244+
if nt is None:
245+
self.report({'ERROR'}, "NodeToPython: Found an invalid node tree. "
246+
"Are all data blocks valid?")
247+
return
244248
if nt not in visited:
245249
visited.add(nt)
246250
for group_node in [node for node in nt.nodes

0 commit comments

Comments
 (0)