Abiword: Don't call the callback if null

pull/4960/head
Richard Hansen 2021-03-17 19:05:14 -04:00 committed by John McLear
parent 83f39289aa
commit 259ee4a987
1 changed files with 1 additions and 1 deletions

View File

@ -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();