From 88dd449ac6edc975b102e1ae40ceabd5032576f4 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 18 Oct 2020 10:06:03 +0200 Subject: [PATCH] Graph: Avoid calling a method on null Fixes APP-DX --- lib/core/graph.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; + } } }