diff options
author | Eugene Platonov <jozic@live.com> | 2015-09-30 14:27:35 -0400 |
---|---|---|
committer | Eugene Platonov <jozic@live.com> | 2015-09-30 14:27:35 -0400 |
commit | 03c98bb08accc1081e47374ad558e5dd452aea49 (patch) | |
tree | 2da01921f6baada8ccd56d9358ba69ebe73986ef /kamon-core | |
parent | b7606407f7e622ae7193acbb049543ab883891a1 (diff) | |
download | Kamon-03c98bb08accc1081e47374ad558e5dd452aea49.tar.gz Kamon-03c98bb08accc1081e47374ad558e5dd452aea49.tar.bz2 Kamon-03c98bb08accc1081e47374ad558e5dd452aea49.zip |
= core: don't throw an NPE during shutdown if Kamon hasn't been started
Diffstat (limited to 'kamon-core')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index 1c560d9f..9c843eb4 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -68,8 +68,10 @@ object Kamon { def shutdown(): Unit = { _coreComponents = None - _system.shutdown() - _system = null + if (_system ne null) { + _system.shutdown() + _system = null + } } def metrics: MetricsModule = |