Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

Guard duplicate HUD creation

EtienneLescot59cfe26f91d4
diff --git a/electron/main.ts b/electron/main.ts
index 16473e6f0..57e489f30 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -92,6 +92,10 @@ const defaultTrayIcon = getTrayIcon("openscreen.png", trayIconSize);
const recordingTrayIcon = getTrayIcon("rec-button.png", trayIconSize);
function createWindow() {
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ return;
+ }
+
mainWindow = createHudOverlayWindow();
}