     Event.on 'window:open', (e) => @addBuffer e.details
     Event.on 'window:close', (e) => @removeBuffer e.details
 
-    @addBuffer path
+    @addBuffer path if path
 
     # Resize editor when panes are added/removed
     el = document.body

        @ace.setSession  new EditSession ''

  focusBuffer: (path) ->
    return if @activePath == path

    @activePath = path


      mode = @modeForPath path
      buffer.setMode new mode if mode

      return
      @buffers[path] = buffer

    buffer.on 'change', -> buffer.$atom_dirty = true
