From 68ae6579621e3dbf873f7ccdde2222f900bb7f76 Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Thu, 1 Dec 2016 20:33:55 +0200 Subject: [PATCH] Added check for Toolbar event start before closing it. --- src/class-laps.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/class-laps.php b/src/class-laps.php index 8e8de79..06ed8a2 100644 --- a/src/class-laps.php +++ b/src/class-laps.php @@ -222,7 +222,9 @@ class Laps { ) ); - self::$stopwatch->stop( 'Toolbar' ); + if ( self::$stopwatch->isStarted( 'Toolbar' ) ) { + self::$stopwatch->stop( 'Toolbar' ); + } $events = self::$stopwatch->getSectionEvents( '__root__' ); $start = $timestart * 1000;