         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'

        for breakpoint in event.removed
          if breakpoint.getMarker()
            breakpoint.getMarker().destroy()
            
    atom.workspace.observeTextEditors (editor) =>
      if (atom.config.get('php-debug.GutterBreakpointToggle'))
        @createGutter editor
      else 
        for breakpoint in @GlobalContext.getBreakpoints()
          if breakpoint.getPath() == editor.getPath()
            marker = @addBreakpointMarker(breakpoint.getLine(), editor)
            breakpoint.setMarker(marker)
            
    atom.config.observe "php-debug.GutterBreakpointToggle", (newValue) =>
      @createGutters newValue    
        
    atom.config.observe "php-debug.GutterPosition", (newValue) =>
      @createGutters atom.config.get('php-debug.GutterBreakpointToggle'),true


          @getUnifiedView().setVisible(false)
          @statusView?.setActive(false)
          return

      @createGutter()

    else
      @getUnifiedView().setVisible(false)
      @statusView?.setActive(false)
