# HG changeset patch
# User lbessard
# Date 1184140407 -7200
# Node ID e08c65e27557741b0daa91e545aefb0f108541f9
# Parent  6cce7d14647e8d1cb1a7ce511978050d25fa9411
Bug on configuration generation fixed

diff -r 6cce7d14647e -r e08c65e27557 stage4/generate_cc/generate_cc.cc
--- a/stage4/generate_cc/generate_cc.cc	Sat Jul 07 11:34:21 2007 +0200
+++ b/stage4/generate_cc/generate_cc.cc	Wed Jul 11 09:53:27 2007 +0200
@@ -1208,8 +1208,10 @@
       s4o.indent_left();
       s4o.print("}\n\n");
       
-      if (single_resource)
+      if (single_resource) {
         delete current_resource_name;
+        current_resource_name = NULL;
+      }
       return NULL;
     }
     
@@ -1242,7 +1244,8 @@
         }
         
         wanted_assigntype = assign_at;
-        symbol->prog_conf_elements->accept(*this);
+        if (symbol->prog_conf_elements != NULL)
+          symbol->prog_conf_elements->accept(*this);
         
         s4o.print(s4o.indent_spaces);
         symbol->program_type_name->accept(*this);
@@ -1252,7 +1255,8 @@
         s4o.print(");\n");
         
         wanted_assigntype = send_at;
-        symbol->prog_conf_elements->accept(*this);
+        if (symbol->prog_conf_elements != NULL)
+          symbol->prog_conf_elements->accept(*this);
         
         if (symbol->task_name != NULL) {
           s4o.indent_left();