ni_nitdoc: do not crash if intro does not have a node in the AST
authorJean Privat <jean@pryen.org>
Thu, 1 Aug 2013 18:09:06 +0000 (14:09 -0400)
committerJean Privat <jean@pryen.org>
Thu, 1 Aug 2013 18:09:06 +0000 (14:09 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/ni_nitdoc.nit

index bdb915e..933e801 100644 (file)
@@ -1439,7 +1439,7 @@ redef class MPropDef
                if not page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then return
                var nprop = page.ctx.mbuilder.mpropdef2npropdef[self]
                page.append("<div class='description'>")
-               if not is_intro then
+               if not is_intro and page.ctx.mbuilder.mpropdef2npropdef.has_key(mproperty.intro) then
                        var intro_nprop = page.ctx.mbuilder.mpropdef2npropdef[mproperty.intro]
                        page.append("<p>from ")
                        mproperty.html_namespace(page)