From 93534e6934081af5ee10c423e560a20800ffba5e Mon Sep 17 00:00:00 2001 From: lsagona Date: Mon, 31 Aug 2020 16:18:37 +0200 Subject: [PATCH] fix exception --- src/main/kotlin/application/controller/DataPanelController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/application/controller/DataPanelController.kt b/src/main/kotlin/application/controller/DataPanelController.kt index 5b2f5f1..f0c6fa3 100644 --- a/src/main/kotlin/application/controller/DataPanelController.kt +++ b/src/main/kotlin/application/controller/DataPanelController.kt @@ -91,7 +91,7 @@ class DataPanelController : Initializable, SelectedVesselListener { } private fun plot() { - if (selectedItem != null || observableSelectedVessel.value == Vessel(null)) { + if (selectedItem != null && observableSelectedVessel.value.messages.size != 0) { GlobalScope.launch { plot(selectedItem) } -- 1.7.10.4