]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix loading wallpaper.el on MS-Windows
authorStefan Kangas <stefankangas@gmail.com>
Thu, 29 Sep 2022 16:44:03 +0000 (18:44 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 29 Sep 2022 16:44:03 +0000 (18:44 +0200)
* lisp/image/wallpaper.el (wallpaper--find-command)
(wallpaper--find-command-args): Avoid backtrace when
'wallpaper--find-setter' returns nil, e.g. on MS-Windows.
(Bug#58167)

lisp/image/wallpaper.el

index 80c98629166f6faa8d32d35953afa4d2559e146d..3f852f2504fd1eda2cdbfb7e34f4b93050b22d64 100644 (file)
@@ -271,11 +271,13 @@ order in which they appear.")
 
 (defun wallpaper--find-command ()
   "Return a valid command to set the wallpaper in this environment."
-  (wallpaper-setter-command (wallpaper--find-setter)))
+  (when-let ((setter (wallpaper--find-setter)))
+    (wallpaper-setter-command setter)))
 
 (defun wallpaper--find-command-args ()
   "Return command line arguments matching `wallpaper-command'."
-  (wallpaper-setter-args (wallpaper--find-setter)))
+  (when-let ((setter (wallpaper--find-setter)))
+    (wallpaper-setter-args setter)))
 
 \f
 ;;; Customizable variables