changeset 69414:a159957988d5

(battery-linux-proc-acpi): Check `capacity' for non-nil before comparing with `low' and `warn'.
author Juri Linkov <juri@jurta.org>
date Sat, 11 Mar 2006 22:34:46 +0000
parents 774f0386ba3c
children bbbd0ad05f29
files lisp/battery.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/battery.el	Sat Mar 11 21:23:11 2006 +0000
+++ b/lisp/battery.el	Sat Mar 11 22:34:46 2006 +0000
@@ -391,8 +391,8 @@
 					 rate-type)) "N/A"))
 	  (cons ?B (or charging-state "N/A"))
 	  (cons ?b (or (and (string= charging-state "charging") "+")
-		       (and (< capacity low) "!")
-		       (and (< capacity warn) "-")
+		       (and capacity (< capacity low) "!")
+		       (and capacity (< capacity warn) "-")
 		       ""))
 	  (cons ?h (or (and hours (number-to-string hours)) "N/A"))
 	  (cons ?m (or (and minutes (number-to-string minutes)) "N/A"))