Protect against null mainWindow in captureAndSaveWindowStats (#2061)
This commit is contained in:
4
main.js
4
main.js
@@ -216,6 +216,10 @@ function createWindow() {
|
|||||||
mainWindow = new BrowserWindow(windowOptions);
|
mainWindow = new BrowserWindow(windowOptions);
|
||||||
|
|
||||||
function captureAndSaveWindowStats() {
|
function captureAndSaveWindowStats() {
|
||||||
|
if (!mainWindow) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const size = mainWindow.getSize();
|
const size = mainWindow.getSize();
|
||||||
const position = mainWindow.getPosition();
|
const position = mainWindow.getPosition();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user