From 0b7836dda668a64577778d05ce02d65301bb631b Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 20 Mar 2016 12:12:27 +0100 Subject: [PATCH] Don't bug out on nil `patch-buf' arguments * lisp/vc/ediff.el (ediff-patch-file): Don't bug out on nil `patch-buf' arguments. --- lisp/vc/ediff.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index be4ced9b55f..a4244c941d2 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -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)) -- 2.39.5