Merge pull request #58 from andrerfneves/bugfix/ipc-on-close-crash

Bugfix/ipc on close crash
This commit is contained in:
George Lima 2019-01-29 21:07:44 -02:00 committed by GitHub
commit 2deae2b48c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -0,0 +1,3 @@
declare module 'process-exists' {
declare module.exports: string => Promise<boolean>;
}