Permalink
Browse files

fixed a nullpo on starting a presentation script contains 'img' becau…

…se it saw *run-file*.
  • Loading branch information...
fukamachi committed Dec 23, 2010
1 parent d78aeab commit b9525f55e3f66d187294b8ab59e2a189b3d6d10d
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/L5/layout.clj
View
@@ -21,8 +21,9 @@
(defmacro with-padding [padding & body]
`(with {:padding ~padding} ~@body))
-(defn img [file]
- {:body (ImageIO/read (File. (str (.getParent (File. @*run-file*)) "/" file)))})
+(defn img [filename]
+ {:body (ImageIO/read
+ (File. (str (.getParent (File. (or @*run-file* *file*))) "/" filename)))})
(defmacro title [& strs]
`{:attr {:font-size (* 1.3 (:font-size (context)))

0 comments on commit b9525f5

Please sign in to comment.