]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
ccode: Fix typo and actually check "end_decls"
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 9 Oct 2018 06:28:33 +0000 (08:28 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 22 Oct 2018 19:52:49 +0000 (21:52 +0200)
Note both begin_decls and end_decls must be either not null or null.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/672

ccode/valaccodefile.vala

index aa5be219e13a7beeaca84b6d455dc9c6eb3d6634..e98d84bd079a3fa54a485b40796609e5d1d835f6 100644 (file)
@@ -181,7 +181,7 @@ public class Vala.CCodeFile {
                        once.append (constant_declaration);
                        once.append (new CCodeNewline ());
 
-                       if (begin_decls != null) {
+                       if (end_decls != null) {
                                once.append (new CCodeIdentifier (end_decls));
                                once.append (new CCodeNewline ());
                        }