From 983a3769e7287565f8b9c502905a4dbc6d04b5b0 Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Sun, 31 Jan 2021 22:32:56 -0800 Subject: [PATCH] Check for None first --- pyqtgraph/graphicsItems/GraphItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: