Fixed bug when defining task with single_data_source instead of interval_data_source
authorLaurent Bessard
Thu, 18 Apr 2013 22:27:01 +0200
changeset 816 dcd861dda04a
parent 815 4cfca12bf850
child 817 6a67fbc7bea7
Fixed bug when defining task with single_data_source instead of interval_data_source
stage4/generate_c/generate_c.cc
--- a/stage4/generate_c/generate_c.cc	Fri Apr 05 09:37:52 2013 +0900
+++ b/stage4/generate_c/generate_c.cc	Thu Apr 18 22:27:01 2013 +0200
@@ -476,9 +476,11 @@
 /*  TASK task_name task_initialization */
 //SYM_REF2(task_configuration_c, task_name, task_initialization)  
     void *visit(task_initialization_c *symbol) {
-      unsigned long long time = calculate_time(symbol->interval_data_source);
-      if (time < 0)  ERROR;
-      else           update_ticktime(time);
+      if (symbol->interval_data_source != NULL) {
+    	  unsigned long long time = calculate_time(symbol->interval_data_source);
+    	  if (time < 0)  ERROR;
+    	  else           update_ticktime(time);
+      }
       return NULL;
     }
 };