Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,11 @@ async function showSplashScreen() {
function closeSplashScreen() {
if (splashWindow) {
console.log(`[${timestamp()}] Closing splash screen...`);
splashWindow.close();
const win = splashWindow;
splashWindow = null;
if (!win.isDestroyed()) {
win.destroy(); // Immediate destruction - avoids race with internal renderer scripts
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/node/services/tools/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function sendElectronNotification(
notification.on("click", () => {
const windows = BrowserWindow.getAllWindows();
const mainWindow = windows[0];
if (mainWindow) {
if (mainWindow && !mainWindow.isDestroyed()) {
// Restore if minimized, then focus
if (mainWindow.isMinimized()) {
mainWindow.restore();
Expand Down
Loading