electron: prevent possible error when stopping server

This commit is contained in:
jean-emmanuel 2025-11-10 23:27:21 +01:00
parent 3451feef24
commit dc7ac2bcd3

View file

@ -143,7 +143,7 @@ function stopServerProcess() {
var toClose = clientWindows.filter(w=>w && !w.isDestroyed()),
closed = 0
if (toClose.length === 0) {
if (toClose.length === 0 && serverProcess) {
serverProcess.kill('SIGINT')
serverProcess = null
}