From: Edward M. Reingold Date: Mon, 7 Nov 1994 16:39:17 +0000 (+0000) Subject: Check for nil time before trying to adjust it for dst. X-Git-Tag: emacs-19.34~6026 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89719ce9c51e8946471d42dff32c2c8ac769d242;p=emacs.git Check for nil time before trying to adjust it for dst. --- diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 6eb412758b0..a35dfe53f13 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -382,9 +382,9 @@ Format used is given by `calendar-time-display-form'." (defun solar-sunrise-sunset (date) "String giving local times of sunrise and sunset on Gregorian DATE." (let* ((rise (solar-sunrise date)) - (adj-rise (solar-adj-time-for-dst date rise)) + (adj-rise (if rise (solar-adj-time-for-dst date rise))) (set (solar-sunset date)) - (adj-set (solar-adj-time-for-dst date set))) + (adj-set (if set (solar-adj-time-for-dst date set)))) (format "%s, %s at %s" (if (and rise (calendar-date-equal date (car adj-rise))) (concat "Sunrise " (apply 'solar-time-string (cdr adj-rise)))