Skip to content

Commit b10027b

Browse files
committed
[ui] Graph: canExpandForLoop: Ensure all checks are performed on a ListAttribute
1 parent 7592b3a commit b10027b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

meshroom/ui/graph.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ def duplicateNodesFrom(self, nodes):
753753
def canExpandForLoop(self, currentEdge):
754754
""" Check if the list attribute can be expanded by looking at all the edges connected to it. """
755755
listAttribute = currentEdge.src.root
756-
if not listAttribute:
756+
# Check that the parent is indeed a ListAttribute (it could be a GroupAttribute, for instance)
757+
if not listAttribute or not isinstance(listAttribute, ListAttribute):
757758
return False
758759
srcIndex = listAttribute.index(currentEdge.src)
759760
allSrc = [e.src for e in self._graph.edges.values()]

0 commit comments

Comments
 (0)