From ffb865d1c0f17fe21a1a75818a76b4cba22a6f0a Mon Sep 17 00:00:00 2001 From: Elioby Date: Thu, 16 Jun 2022 10:32:14 +0100 Subject: [PATCH] Only attempt to use the taskbar if it is supported --- src/main/kotlin/dev/shota/decompiler/window/Window.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/shota/decompiler/window/Window.kt b/src/main/kotlin/dev/shota/decompiler/window/Window.kt index 69537ad..65b8ec1 100644 --- a/src/main/kotlin/dev/shota/decompiler/window/Window.kt +++ b/src/main/kotlin/dev/shota/decompiler/window/Window.kt @@ -36,7 +36,7 @@ object Window : JFrame() { title = "Decompiler" defaultCloseOperation = DISPOSE_ON_CLOSE val icon = ImageIcon(javaClass.classLoader.getResourceAsStream("icons/logo.png")?.readAllBytes()).image - if (Taskbar.getTaskbar().isSupported(Taskbar.Feature.ICON_IMAGE)) Taskbar.getTaskbar().iconImage = icon + if (Taskbar.isTaskbarSupported() && Taskbar.getTaskbar().isSupported(Taskbar.Feature.ICON_IMAGE)) Taskbar.getTaskbar().iconImage = icon iconImage = icon jMenuBar = Menu()