From: Alexandre Terrasa Date: Thu, 7 May 2015 05:35:09 +0000 (-0400) Subject: contrib/nitiwiki: avoid crash on `WikiArticle.md` with auto generated articles X-Git-Tag: v0.7.5~30^2~9 X-Git-Url: http://nitlanguage.org contrib/nitiwiki: avoid crash on `WikiArticle.md` with auto generated articles Signed-off-by: Alexandre Terrasa --- 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