Fix a crash.
The compact reporter was canceling a timer when it might not have been
initialized.
R=kevmoo@google.com
Review URL: https://codereview.chromium.org//1214773003.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee05df4..e790b21 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.12.3+5
+
+* Fix a crash when skipping tests because their platforms don't match.
+
## 0.12.3+4
* The compact reporter will update the timer every second, rather than only
diff --git a/lib/src/runner/reporter/compact.dart b/lib/src/runner/reporter/compact.dart
index 2fd6540..3981792 100644
--- a/lib/src/runner/reporter/compact.dart
+++ b/lib/src/runner/reporter/compact.dart
@@ -210,7 +210,7 @@
/// [success] will be `true` if all tests passed, `false` if some tests
/// failed, and `null` if the engine was closed prematurely.
void _onDone(bool success) {
- _timer.cancel();
+ if (_timer != null) _timer.cancel();
_timer = null;
_stopwatch.stop();
diff --git a/pubspec.yaml b/pubspec.yaml
index e582ede..cfa6205 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: test
-version: 0.12.3+4
+version: 0.12.3+5
author: Dart Team <misc@dartlang.org>
description: A library for writing dart unit tests.
homepage: https://github.com/dart-lang/test