Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit d68eb08

Browse files
committed
Move mainWindow initialization to top
1 parent dc491db commit d68eb08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ var version = app.getVersion();
3030
var trayMenu = null;
3131
var subpy = null;
3232

33+
// Keep a global reference of the window object, if you don't, the window will
34+
// be closed automatically when the JavaScript object is GCed.
35+
var mainWindow = null;
36+
3337
var open_url = null; // This is for if someone opens a URL before the client is open
3438

3539
if (argv.userData) {
@@ -204,10 +208,6 @@ ipcMain.on('activeServerChange', function(event, server) {
204208
// Report crashes to our server.
205209
//require('crash-reporter').start();
206210

207-
// Keep a global reference of the window object, if you don't, the window will
208-
// be closed automatically when the JavaScript object is GCed.
209-
var mainWindow = null;
210-
211211
if (process.platform === "win32") {
212212
initWin32();
213213
}

0 commit comments

Comments
 (0)