Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncaught exception in main.js - Cannot read property 'webContents' of null #395

Closed
araujoarthur0 opened this issue Oct 2, 2020 · 0 comments · Fixed by #397
Closed

uncaught exception in main.js - Cannot read property 'webContents' of null #395

araujoarthur0 opened this issue Oct 2, 2020 · 0 comments · Fixed by #397
Assignees
Labels
bug Something isn't working

Comments

@araujoarthur0
Copy link
Collaborator

Describe the issue
A crash in main.js on an idle TTL window:

Fri, 02 Oct 2020 13:12:37 GMT uncaughtException: Cannot read property 'webContents' of null TypeError: Cannot read property 'webContents' of null at Timeout.refreshOnDayChange [as _onTimeout] (C:\Users\araujo\Documents\workspace\time-to-leave\main.js:41:20) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7)

Apparently mainWindow can be null at this stage. Other usages of the variable in main.js always check if it's not null before using it, while this one doesn't. The fix should be to add an if guard.

Expected behavior
No crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant