From 8b16f2d0d90bfdcb1939b75b46bec296f7c72385 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 5 Apr 2023 11:56:12 +0100 Subject: [PATCH] Fix error when breadcrumb image fails to load (#609) --- src/ipc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = "";