do not abort when before_bdev_event_hook does not find a block device in the state
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 31 Jul 2007 19:46:15 +0000 (19:46 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 31 Jul 2007 19:46:15 +0000 (19:46 +0000)
this happens the first time a block device is seen

git-svn-id: http://ltt.polymtl.ca/svn@2573 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c

index 4d30a4bf457f1752a1f804367c93fa7be2675708..05ad99c104f2607bd39e14adee65cc91b67c1701 100644 (file)
@@ -548,7 +548,6 @@ int before_schedchange_hook(void *hook_data, void *call_data)
                   width,
                   &x);
 
-
         /* Jump over draw if we are at the same x position */
         if(x == hashed_process_data->x.middle &&
              hashed_process_data->x.middle_used)
@@ -1396,7 +1395,9 @@ int before_bdev_event_hook(void *hook_data, void *call_data)
   guint trace_num = ts->parent.index;
 
   LttvBdevState *bdev = g_hash_table_lookup(ts->bdev_states, &devcode_gint); 
-  g_assert(bdev != NULL);
+  /* TODO: if bdev not found, draw right colour to indicate unknown state */
+  if(bdev == NULL)
+    return 0;
 
 //  guint pid = process->pid;
 
This page took 0.028743 seconds and 4 git commands to generate.