From 2af3e992a1ee576fa08cddee334ab2b3da8b3eeb Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Thu, 30 May 2024 03:48:04 -0400 Subject: [PATCH] #1926 Toolkit not initialized error when running headless during APCO25 channel start processing request. (#1928) Co-authored-by: Dennis Sheirer --- .../controller/channel/ChannelProcessingManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java b/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java index da13b8728..4e0e2f3a2 100644 --- a/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java +++ b/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java @@ -395,7 +395,10 @@ private synchronized void startProcessing(ChannelStartProcessingRequest request) if(source == null) { //This has to be done on the FX event thread when the playlist editor is constructed - Platform.runLater(() -> channel.setProcessing(false)); + if(!GraphicsEnvironment.isHeadless()) + { + Platform.runLater(() -> channel.setProcessing(false)); + } mChannelEventBroadcaster.broadcast(new ChannelEvent(channel, ChannelEvent.Event.NOTIFICATION_PROCESSING_START_REJECTED, TUNER_UNAVAILABLE_DESCRIPTION));