From f93b09fc9e635e7975b4eca58e9c3edc08f8e197 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 17 Apr 2013 18:43:58 -0700 Subject: [PATCH] Don't try to active windows without a path Previously Atom would crash if a path was opened when there was already a window open that did not have a path, such as the specs window. Now window controllers without a path are skipped during the checks to activate an existing window for an opened path. --- native/atom_application.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/native/atom_application.mm b/native/atom_application.mm index 5fbc1b9db..218cf0c50 100644 --- a/native/atom_application.mm +++ b/native/atom_application.mm @@ -150,6 +150,9 @@ for (NSWindow *window in [self windows]) { if (![window isExcludedFromWindowsMenu]) { AtomWindowController *controller = [window windowController]; + if (!controller.pathToOpen) { + continue; + } if (!openingDirectory) { BOOL openedPathIsDirectory = false; [[NSFileManager defaultManager] fileExistsAtPath:controller.pathToOpen isDirectory:&openedPathIsDirectory];