src/doc/templates: protect access to nullable signatures
authorAlexandre Terrasa <alexandre@moz-code.org>
Sat, 2 Jun 2018 16:11:21 +0000 (12:11 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Sun, 10 Jun 2018 17:25:06 +0000 (13:25 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/templates/templates_html.nit

index f74ac84..ac02f10 100644 (file)
@@ -263,7 +263,9 @@ redef class MMethodDef
                if mproperty.is_root_init and new_msignature != null then
                        return new_msignature.html_signature(short)
                end
-               return msignature.as(not null).html_signature(short)
+               var msignature = self.msignature
+               if msignature == null then return new Template
+               return msignature.html_signature(short)
        end
 end