From 259ee4a987d3db44d3b226c8edebdae86f461245 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 17 Mar 2021 19:05:14 -0400 Subject: [PATCH] Abiword: Don't call the callback if null --- src/node/utils/Abiword.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/utils/Abiword.js b/src/node/utils/Abiword.js index f77b69cf2..d21a9783d 100644 --- a/src/node/utils/Abiword.js +++ b/src/node/utils/Abiword.js @@ -59,7 +59,7 @@ if (os.type().indexOf('Windows') > -1) { abiword.stderr.on('data', (data) => { stdoutBuffer += data.toString(); }); abiword.on('exit', (code) => { spawnAbiword(); - stdoutCallback(new Error(`Abiword died with exit code ${code}`)); + if (stdoutCallback != null) stdoutCallback(new Error(`Abiword died with exit code ${code}`)); }); abiword.stdout.on('data', (data) => { stdoutBuffer += data.toString();