diff --git a/lib/core/graph.dart b/lib/core/graph.dart index 9e3e97f0..8cf40dec 100644 --- a/lib/core/graph.dart +++ b/lib/core/graph.dart @@ -188,8 +188,10 @@ class Graph extends ChangeNotifier { } void stopLayout() { - layoutTimer.cancel(); - layoutTimer = null; + if (layoutTimer != null) { + layoutTimer.cancel(); + layoutTimer = null; + } } }