From: Jürg Billeter Date: Tue, 7 Jul 2009 12:35:53 +0000 (+0100) Subject: GAsync: Fix critical warning X-Git-Tag: 0.7.5~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fa619e7c02f55ae776f82ba5e2b140d46f17692;p=thirdparty%2Fvala.git GAsync: Fix critical warning --- diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala index b8ba1a11e..90e9552be 100644 --- a/codegen/valagerrormodule.vala +++ b/codegen/valagerrormodule.vala @@ -151,7 +151,7 @@ internal class Vala.GErrorModule : CCodeDelegateModule { if (current_method is CreationMethod) { cerror_block.add_statement (new CCodeReturnStatement (new CCodeConstant ("NULL"))); - } else if (current_method.coroutine) { + } else if (current_method != null && current_method.coroutine) { cerror_block.add_statement (new CCodeReturnStatement (new CCodeConstant ("FALSE"))); } else if (current_return_type is VoidType) { cerror_block.add_statement (new CCodeReturnStatement ());