   #           offsetTop - The {MinimapElement} offset at the moment of the
   #                       drag start.
   drag: (e, initial) ->
-    return if @minimap.isDestroyed()
+    return unless @minimap
     return if e.which isnt 1 and e.which isnt 2
     y = e.pageY - initial.offsetTop - initial.dragOffset
 

  destroy: ->
    @subscriptions.dispose()
    @detach()

  #     ######   #######  ##    ## ######## ######## ##    ## ########
  #    ##    ## ##     ## ###   ##    ##    ##       ###   ##    ##


  # Internal: Performs the actual {MinimapElement} update.
  update: ->
    return unless @attached and @isVisible() and @minimap?

    if @adjustToSoftWrap and @marginRight?
      @style.marginRight = @marginRight + 'px'
