hotfix: validate mainWindow.webContents before send

This commit is contained in:
George Lima 2019-01-02 16:31:44 -03:00
parent eb27d6a0f3
commit ea2874144f
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ const runDaemon: () => Promise<?ChildProcess> = () => new Promise(async (resolve
);
childProcess.stdout.on('data', (data) => {
if (mainWindow) mainWindow.webContents.send('zcashd-log', data.toString());
if (mainWindow && mainWindow.webContents) mainWindow.webContents.send('zcashd-log', data.toString());
if (!resolved) {
resolve(childProcess);
resolved = true;