Check for None first

This commit is contained in:
Ogi Moore 2021-01-31 22:32:56 -08:00
parent ca7b4580fa
commit 983a3769e7

View File

@ -55,7 +55,7 @@ class GraphItem(GraphicsObject):
""" """
if 'adj' in kwds: if 'adj' in kwds:
self.adjacency = kwds.pop('adj') self.adjacency = kwds.pop('adj')
if self.adjacency.dtype.kind not in 'iu' and self.adjacency is not None: if self.adjacency is not None and self.adjacency.dtype.kind not in 'iu':
raise Exception("adjacency array must have int or unsigned type.") raise Exception("adjacency array must have int or unsigned type.")
self._update() self._update()
if 'pos' in kwds: if 'pos' in kwds: