From 696c528379a92274ccdc8688863e2ab1cd5a762c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 29 Sep 2022 18:44:03 +0200 Subject: [PATCH] Fix loading wallpaper.el on MS-Windows * 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 80c98629166..3f852f2504f 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -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))) ;;; Customizable variables -- 2.39.2