From e6132b54351ecb487001cc4592f313efcb3d8f15 Mon Sep 17 00:00:00 2001 From: Narendra Joshi Date: Sat, 21 Mar 2020 20:45:38 +0100 Subject: [PATCH] Add nil check for pstyle and lstyle in calc-graph-add-curve. --- lisp/calc/calc-graph.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 4cdfdbd4b9..4feddd9e4d 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -211,9 +211,9 @@ calc-graph-add-curve (setq pstyle (and (eq (car-safe pstyle) 'vec) (nth (1+ num) pstyle))) (setq lstyle (and (eq (car-safe lstyle) 'vec) (nth (1+ num) lstyle)))) (calc-graph-set-styles - (or (and (Math-num-integerp lstyle) (math-trunc lstyle)) + (or (and lstyle (Math-num-integerp lstyle) (math-trunc lstyle)) 0) - (or (and (Math-num-integerp pstyle) (math-trunc pstyle)) + (or (and pstyle (Math-num-integerp pstyle) (math-trunc pstyle)) (if (eq (car-safe (calc-var-value (nth 2 ydata))) 'vec) 0 -1)) (math-contains-sdev-p (eval (nth 2 ydata)))))) -- 2.20.1