From 71d75584ee31e3f122b33a88029617d7367d22b9 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 8 Nov 2022 09:36:06 +0100 Subject: [PATCH] possible fix for #275 --- gui/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/main.js b/gui/main.js index 544062be..47e8f687 100644 --- a/gui/main.js +++ b/gui/main.js @@ -832,6 +832,7 @@ ipcMain.on('request-stop-rigctld',(event,data)=>{ // CHECK RIGCTLD ipcMain.on('request-check-rigctld',(data)=>{ + try { let Data = { state: "unknown", @@ -843,12 +844,15 @@ ipcMain.on('request-check-rigctld',(data)=>{ } else { Data["state"] = "unknown/stopped"; } - win.webContents.send('action-check-rigctld', Data); + if (win !== null && win !== ''){ + win.webContents.send('action-check-rigctld', Data); + } }) } catch (e) { mainLog.error(e) } + });