]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-ps.scm
Fix TOC: don't add links to non-existing labels in the .ps file
[lilypond.git] / scm / output-ps.scm
index d1c0c419ed427f75b8e263b147e68ee015ad5d14..c83b613cbd1ceca68b2157886cb05fb0b5bfa393 100644 (file)
             url))
 
 (define (page-link page-no x y)
-  (ly:format "~a ~a currentpoint vector_add  ~a ~a currentpoint vector_add ~a mark_page_link"
-            (car x)
-            (car y)
-            (cdr x)
-            (cdr y)
-            page-no))
+  (if (number? page-no)
+    (ly:format "~a ~a currentpoint vector_add  ~a ~a currentpoint vector_add ~a mark_page_link"
+              (car x)
+              (car y)
+              (cdr x)
+              (cdr y)
+              page-no)
+    ""))
 
 (define* (path thickness exps #:optional (cap 'round) (join 'round) (fill? #f))
   (define (convert-path-exps exps)