fix memory leak +

in-app-menu updates menu only if needed
This commit is contained in:
Araxeus
2021-04-03 21:53:39 +03:00
parent 061e4a9e5f
commit 317521bba6
2 changed files with 16 additions and 6 deletions

View File

@ -152,7 +152,13 @@ function createMainWindow() {
return win;
}
let createdWindow = false;
app.on("browser-window-created", (event, win) => {
//Ensure listeners aren't registered when creating input dialog
if(createdWindow){
return;
}
createdWindow = true;
loadPlugins(win);
win.webContents.on("did-fail-load", () => {