diff --git a/pyqtgraph/graphicsItems/GraphItem.py b/pyqtgraph/graphicsItems/GraphItem.py index ee5207e9..c2cb1254 100644 --- a/pyqtgraph/graphicsItems/GraphItem.py +++ b/pyqtgraph/graphicsItems/GraphItem.py @@ -55,7 +55,7 @@ class GraphItem(GraphicsObject): """ if 'adj' in kwds: 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.") self._update() if 'pos' in kwds: