Protect against null mainWindow in captureAndSaveWindowStats (#2061)
This commit is contained in:
parent
a0da73ca8d
commit
06a16baaa5
1 changed files with 4 additions and 0 deletions
4
main.js
4
main.js
|
@ -216,6 +216,10 @@ function createWindow() {
|
|||
mainWindow = new BrowserWindow(windowOptions);
|
||||
|
||||
function captureAndSaveWindowStats() {
|
||||
if (!mainWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
const size = mainWindow.getSize();
|
||||
const position = mainWindow.getPosition();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue