`default-directory' is non-nil.
+2012-01-28 Drew Adams <drew.adams@oracle.com>
+
+ * net/ange-ftp.el (ange-ftp-canonize-filename): Check, that
+ `default-directory' is non-nil.
+
2012-01-28 Eli Zaretskii <eliz@gnu.org>
* mail/emacsbug.el (report-emacs-bug): Fill the potentially long
(if (not (eq system-type 'windows-nt))
(setq name (ange-ftp-real-expand-file-name name))
;; Windows UNC default dirs do not make sense for ftp.
- (setq name (if (string-match "\\`//" default-directory)
+ (setq name (if (and default-directory
+ (string-match "\\`//" default-directory))
(ange-ftp-real-expand-file-name name "c:/")
(ange-ftp-real-expand-file-name name)))
;; Strip off possible drive specifier.