diff --git a/src/ipc.ts b/src/ipc.ts index a8d6f28..78fa210 100644 --- a/src/ipc.ts +++ b/src/ipc.ts @@ -220,7 +220,8 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) { return resp.arrayBuffer(); }) .then((arrayBuffer) => { - const buffer = Buffer.from(arrayBuffer!); + if (!arrayBuffer) return; + const buffer = Buffer.from(arrayBuffer); button.icon = nativeImage.createFromBuffer(buffer); button.label = ""; button.backgroundColor = "";