Skip to content

Commit

Permalink
Fix crash caused by electron-context-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbinnie committed Jan 31, 2025
1 parent 6c17001 commit 9e72535
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion patches/electron-context-menu+4.0.4.patch
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ index 468e48b..e182878 100644
event: ElectronEvent
) => MenuItemConstructorOptions[];
diff --git a/node_modules/electron-context-menu/index.js b/node_modules/electron-context-menu/index.js
index b10daea..ea2f891 100644
index b10daea..d7d26f3 100644
--- a/node_modules/electron-context-menu/index.js
+++ b/node_modules/electron-context-menu/index.js
@@ -1,7 +1,6 @@
Expand Down Expand Up @@ -103,3 +103,12 @@ index b10daea..ea2f891 100644
},
}),
copyImage: decorateMenuItem({
@@ -350,7 +349,7 @@ const create = (win, options) => {
webContents(win).on('context-menu', handleContextMenu);

return () => {
- if (win.isDestroyed()) {
+ if (webContents(win).isDestroyed()) {
return;
}

0 comments on commit 9e72535

Please sign in to comment.