fix bugs uint 64 + no trace
[lttv.git] / ltt / branches / poly / lttv / modules / gui / controlflow / drawing.c
index 28934be2dc5f27b271f668e6d451bb903ed1b851..fa1c144ef4da90e97ea4e9bff84ed5100c4e09f3 100644 (file)
@@ -157,8 +157,7 @@ void drawing_data_request(Drawing_t *drawing,
     nb_trace = lttv_traceset_number(traceset);
     // FIXME : eventually request for more traces
     // for(i = 0 ; i < nb_trace ; i++) {
-    g_assert(TRACE_NUMBER < nb_trace);
-    i = TRACE_NUMBER;
+    for(i = 0; i<MIN(TRACE_NUMBER+1, nb_trace);i++)
     {
       EventsRequest *events_request = g_new(EventsRequest, 1);
       // Create the hooks
@@ -860,10 +859,9 @@ Drawing_t *drawing_construct(ControlFlowData *control_flow_data)
 
   /* Allocate the colors */
   GdkColormap* colormap = gdk_colormap_get_system();
-
+  gboolean success[NUM_COLORS];
   gdk_colormap_alloc_colors(colormap, drawing_colors, NUM_COLORS, FALSE,
-                            TRUE, NULL);
-  
+                            TRUE, success);
   
   return drawing;
 }
@@ -942,8 +940,13 @@ __inline void convert_time_to_pixels(
   
   time_ll = ltt_time_to_uint64(time);
   interval_ll = ltt_time_to_uint64(window_time_interval);
-
-  *x = (guint)(time_ll * width / interval_ll);
+  
+  if(interval_ll == 0) {
+    g_assert(time_ll == 0);
+    *x = 0;
+  } else {
+    *x = (guint)(time_ll * width / interval_ll);
+  }
   
 }
 
This page took 0.023204 seconds and 4 git commands to generate.