Skip to content

Commit 57d1c2a

Browse files
committed
Fixes rare issue when adding a link. Fixes #573.
1 parent 409d3de commit 57d1c2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gns3/link.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ def newNIOSlot(self, node_id, port_id):
257257
:param port_id: port identifier
258258
"""
259259

260+
# in very rare cases link is already deleted
261+
if self is None:
262+
return
263+
260264
# check that the node is connected to this link as a source
261265
if node_id == self._source_node.id() and port_id == self._source_port.id():
262266
self._source_nio_active = True

0 commit comments

Comments
 (0)