diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-04-05 22:34:43 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-04-05 22:34:43 +0200 |
commit | 15164a6f4aae29e8c3df0d21b0ac1d585c286a07 (patch) | |
tree | 5f6147972fa9a07fd000a99e2e6b435af9d66941 | |
parent | b89b720d908acbb7f683f4a8b7815abfc7092ffb (diff) |
Make pict-attr safe.
-rw-r--r-- | pict.scm | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -582,10 +582,11 @@ strings that are built from the list of attributes LST." (define (pict-attr attr pict) "Return the value of the selected ATTRIBUTE of the outermost element -of the SVG of PICT." +of the SVG of PICT or #F." (and=> ((sxpath `(@ ,attr *any*)) (pict-sxml pict)) - car)) + (lambda (m) (and (pair? m) + (car m))))) (define (pict-height pict) "Return the height of PICT." |