 
     var displayImage: NSImage? {
         get {
-            let size = NSMakeSize(CGFloat(kTitleNormal), CGFloat(kTitleNormal))
-
-            let tmp = QLThumbnailImageCreate(kCFAllocatorDefault, self.fileURL! as CFURL , size, nil)
-            if let tmpImage = tmp?.takeUnretainedValue() {
-                let tmpIcon = NSImage(cgImage: tmpImage, size: size)
-                return tmpIcon
-            }
-            else
-            {
-                return NSApp.applicationIconImage
-            }
+            if (self.fileURL?.isFileURL) != nil {
+                let size = NSMakeSize(CGFloat(kTitleNormal), CGFloat(kTitleNormal))
+                
+                let tmp = QLThumbnailImageCreate(kCFAllocatorDefault, self.fileURL! as CFURL , size, nil)
+                if let tmpImage = tmp?.takeUnretainedValue() {
+                    let tmpIcon = NSImage(cgImage: tmpImage, size: size)
+                    return tmpIcon
+                }
+            }
+            return NSApp.applicationIconImage
         }
     }
     override var displayName: String! {
         get {
-            if let justTheName = super.displayName  {
-                return (justTheName as NSString).deletingPathExtension
-            }
-            else
-            {
-                return super.displayName
-            }
+            if (self.fileURL?.isFileURL) != nil {
+                if let justTheName = super.displayName  {
+                    return (justTheName as NSString).deletingPathExtension
+                }
+            }
+            return super.displayName
         }
         set (newName) {
             super.displayName = newName

    
    // See values in HeliumPanelController.TranslucencyPreference
    let translucencyPreference = Setup<HeliumPanelController.TranslucencyPreference>("rawTranslucencyPreference", value: .never)
}

class Document : NSDocument {

        window.makeKeyAndOrderFront(sender)
    }
    
}
