]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't bug out on nil `patch-buf' arguments
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Mar 2016 11:12:27 +0000 (12:12 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Mar 2016 11:12:27 +0000 (12:12 +0100)
* lisp/vc/ediff.el (ediff-patch-file): Don't bug out on nil
`patch-buf' arguments.

lisp/vc/ediff.el

index be4ced9b55f3d5eb6120c13e4fcb9f6e5587cd7f..a4244c941d217d0b249724e07baed8a6443ee267 100644 (file)
@@ -1367,8 +1367,8 @@ buffer. If odd -- assume it is in a file."
     (require 'ediff-ptch)
     (setq patch-buf
          (ediff-get-patch-buffer
-          (if arg (prefix-numeric-value arg))
-           (get-buffer patch-buf)))
+          (and arg (prefix-numeric-value arg))
+           (and patch-buf (get-buffer patch-buf))))
     (setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch)
                           ((and (not ediff-patch-default-directory)
                                 (buffer-file-name patch-buf))