         break
     @settingsView = new BreakpointSettingsView({breakpoint:breakpoint,context:@GlobalContext})
     @settingsView.attach()
-  
+
   createGutters: (create,recreate) ->
     editors = atom.workspace.getTextEditors()
     for editor in editors
-      if editor
-        if create == false
+      if (!editor || !editor.gutterWithName)
+        return
+      if create == false
+        if (editor?.gutterWithName('php-debug-gutter') != null)
+          gutter = editor?.gutterWithName('php-debug-gutter')
+          gutter?.destroy()
+      else
+        if recreate
           if (editor?.gutterWithName('php-debug-gutter') != null)
             gutter = editor?.gutterWithName('php-debug-gutter')
             gutter?.destroy()
-        else
-          if recreate
-            if (editor?.gutterWithName('php-debug-gutter') != null)
-              gutter = editor?.gutterWithName('php-debug-gutter')
-              gutter?.destroy()
-          if (editor?.gutterWithName('php-debug-gutter') == null)
-            @createGutter(editor)
-  
+        if (editor?.gutterWithName('php-debug-gutter') == null)
+          @createGutter(editor)
+
   createGutter: (editor) ->
     if (!editor)
       editor = atom.workspace.getActivePaneItem()
 
     if (!editor || !editor.gutterWithName)
       return
-      
+
     gutterEnabled = atom.config.get('php-debug.GutterBreakpointToggle')
     if (!gutterEnabled)
       return
-      
+
     gutterPosition = atom.config.get('php-debug.GutterPosition')
     if gutterPosition == "Left"
       priority = -200
     else
       priority = 200
-      
+
     if (editor.gutterWithName('php-debug-gutter') != null)
       @gutter = editor.gutterWithName('php-debug-gutter')
       return
     else
       @gutter = editor?.gutterContainer.addGutter {name:'php-debug-gutter', priority: priority}
-    
+
     view = atom.views.getView editor
     domNode = atom.views.getView @gutter
     $(domNode).unbind 'click.phpDebug'

      clickedScreenRow = view.component.screenPositionForMouseEvent(event).row
      clickedBufferRow  = editor.bufferRowForScreenRow(clickedScreenRow)+1
      @toggleBreakpoint clickedBufferRow
      
    if @gutter
      for breakpoint in @GlobalContext.getBreakpoints()
        if breakpoint.getPath() == editor.getPath()

  addBreakpointMarker: (line, editor) ->
    gutter = editor.gutterWithName("php-debug-gutter")
    range = [[line-1, 0], [line-1, 0]]

    marker = new BreakpointMarker(editor,range,gutter)
    marker.decorate()

    return marker


  breakpointSettings: ->
    BreakpointSettingsView = require './breakpoint/breakpoint-settings-view'
