From 355bbd78e3e68adfe9264ac764bab2cb44246397 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Thu, 7 May 2015 01:35:09 -0400 Subject: [PATCH] contrib/nitiwiki: avoid crash on `WikiArticle.md` with auto generated articles Signed-off-by: Alexandre Terrasa --- contrib/nitiwiki/src/wiki_base.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/nitiwiki/src/wiki_base.nit b/contrib/nitiwiki/src/wiki_base.nit index dd1e2d6..dc019ed 100644 --- a/contrib/nitiwiki/src/wiki_base.nit +++ b/contrib/nitiwiki/src/wiki_base.nit @@ -542,8 +542,8 @@ class WikiArticle # Extract the markdown text from `source_file`. # # REQUIRE: `has_source`. - var md: String is lazy do - assert has_source + var md: nullable String is lazy do + if not has_source then return null var file = new FileReader.open(src_full_path.to_s) var md = file.read_all file.close -- 1.7.9.5