Fix crash caused by electron-context-menu (#3310)

This commit is contained in:
Devin Binnie
2025-01-31 12:52:49 -05:00
committed by GitHub
parent 6c17001e76
commit 1608e54e01

View File

@@ -47,7 +47,7 @@ index 468e48b..e182878 100644
event: ElectronEvent event: ElectronEvent
) => MenuItemConstructorOptions[]; ) => MenuItemConstructorOptions[];
diff --git a/node_modules/electron-context-menu/index.js b/node_modules/electron-context-menu/index.js 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 --- a/node_modules/electron-context-menu/index.js
+++ b/node_modules/electron-context-menu/index.js +++ b/node_modules/electron-context-menu/index.js
@@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
@@ -103,3 +103,12 @@ index b10daea..ea2f891 100644
}, },
}), }),
copyImage: decorateMenuItem({ 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;
}