]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GAsync: Fix critical warning
authorJürg Billeter <j@bitron.ch>
Tue, 7 Jul 2009 12:35:53 +0000 (13:35 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 7 Jul 2009 12:35:53 +0000 (13:35 +0100)
codegen/valagerrormodule.vala

index b8ba1a11e549815b056126b3aa4201e7dfc361e0..90e9552beb0ea250843746d37329fda61ee0d45f 100644 (file)
@@ -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 ());