From: Didier 'Ptitjes Date: Tue, 9 Jun 2009 09:19:49 +0000 (+0200) Subject: GAsync: Fix uncaught error's return statement X-Git-Tag: 0.7.5~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1151c7c22ec6c36ded031c68e8349c69d4831244;p=thirdparty%2Fvala.git GAsync: Fix uncaught error's return statement FALSE must be returned in coroutines, independent of the return type. Signed-off-by: Didier 'Ptitjes --- diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala index ee93a0965..b8ba1a11e 100644 --- a/codegen/valagerrormodule.vala +++ b/codegen/valagerrormodule.vala @@ -151,6 +151,8 @@ internal class Vala.GErrorModule : CCodeDelegateModule { if (current_method is CreationMethod) { cerror_block.add_statement (new CCodeReturnStatement (new CCodeConstant ("NULL"))); + } else if (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 ()); } else if (current_return_type != null) {