 
   # FIXME facet, to make it work I had to call notifyWindowResizeListeners here
   handleQuery:->
-    {workspace, _currentMode} = @getView()
+
+    return unless view = @getView()
+    {workspace, _currentMode} = view
 
     workspace.ready ->
       wc = KD.getSingleton("windowController")


  constructor:(options = {}, data)->

    options.view    = new DevToolsMainView
    options.appInfo =
      name     : "DevTools"
      type     : "application"

      JSEditor.loadFile  "#{app.fullPath}/index.coffee"
      CSSEditor.loadFile "#{app.fullPath}/resources/style.css"

      view.switchMode 'develop'
