[vala/0.16] codegen: Fix assertion failure on empty string switch statement
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.16] codegen: Fix assertion failure on empty string switch statement
- Date: Sat, 23 Jun 2012 15:53:00 +0000 (UTC)
commit 2167376e06bd089e1123781376320a0a0584eef0
Author: JÃrg Billeter <j bitron ch>
Date: Sat Jun 2 18:26:09 2012 +0200
codegen: Fix assertion failure on empty string switch statement
Fixes bug 677205.
codegen/valaccodecontrolflowmodule.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodecontrolflowmodule.vala b/codegen/valaccodecontrolflowmodule.vala
index 5a4c297..ea64522 100644
--- a/codegen/valaccodecontrolflowmodule.vala
+++ b/codegen/valaccodecontrolflowmodule.vala
@@ -156,12 +156,12 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule {
default_section.emit (this);
- if (n > 0) {
- ccode.close ();
- }
+ ccode.close ();
}
- ccode.close ();
+ if (n > 0) {
+ ccode.close ();
+ }
}
public override void visit_switch_statement (SwitchStatement stmt) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]