diff --git a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java index bdad8b00d..4e0d52ca9 100644 --- a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java +++ b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java @@ -17,6 +17,12 @@ import javax.imageio.ImageIO; public class AppDesktopIntegration { public static void setupDesktopIntegrations() { + // Check if we were/are able to initialize the platform + // If not, we don't have to attempt the awt setup as well + if (!PlatformState.initPlatformIfNeeded()) { + return; + } + try { if (Desktop.isDesktopSupported()) { Desktop.getDesktop().addAppEventListener(new SystemSleepListener() {