Skip to content

Commit

Permalink
fix(packages/core): ctrl/cmd+w can result in null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Jul 25, 2022
1 parent 2c0bda1 commit eb6252f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const closeTab = (
_: import('electron').MenuItem,
browserWindow: import('electron').BrowserWindow & { subwindow: ISubwindowPrefs }
) => {
if (browserWindow.subwindow && browserWindow.subwindow._notAKuiWindow) {
if (browserWindow && browserWindow.subwindow && browserWindow.subwindow._notAKuiWindow) {
browserWindow.close()
} else {
tellRendererToExecute('tab close -A')
Expand Down

0 comments on commit eb6252f

Please # to comment.