mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user