Protect against null mainWindow in captureAndSaveWindowStats (#2061)

This commit is contained in:
Scott Nonnenberg
2018-02-21 14:18:04 -08:00
committed by GitHub
parent a0da73ca8d
commit 06a16baaa5

View File

@@ -216,6 +216,10 @@ function createWindow() {
mainWindow = new BrowserWindow(windowOptions);
function captureAndSaveWindowStats() {
if (!mainWindow) {
return;
}
const size = mainWindow.getSize();
const position = mainWindow.getPosition();