Graph: Avoid calling a method on null

Fixes APP-DX
This commit is contained in:
Vishesh Handa
2020-10-18 10:06:03 +02:00
parent 8e879c293d
commit 88dd449ac6

View File

@ -188,9 +188,11 @@ class Graph extends ChangeNotifier {
} }
void stopLayout() { void stopLayout() {
if (layoutTimer != null) {
layoutTimer.cancel(); layoutTimer.cancel();
layoutTimer = null; layoutTimer = null;
} }
}
} }
class GraphNodeLayout { class GraphNodeLayout {