]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix crash with virtual async methods
authorJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 16:09:58 +0000 (18:09 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 16:09:58 +0000 (18:09 +0200)
codegen/valaccodemethodmodule.vala

index b38f4c1407d33cfd93598af11db7e3378c22fe42..281c44acf2044597d075f92be021403f860264f5 100644 (file)
@@ -845,7 +845,9 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 
        public void generate_vfunc (Method m, DataType return_type, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression> carg_map, string suffix = "", int direction = 3) {
                var vfunc = new CCodeFunction (m.get_cname () + suffix);
-               vfunc.line = function.line;
+               if (function != null) {
+                       vfunc.line = function.line;
+               }
 
                var vblock = new CCodeBlock ();