From e098ade03ee410d2fc9fc57f7478f0f74ee9014f Mon Sep 17 00:00:00 2001 From: pmf Date: Tue, 31 Jul 2007 19:46:15 +0000 Subject: [PATCH] do not abort when before_bdev_event_hook does not find a block device in the state 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c index 4d30a4bf..05ad99c1 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c @@ -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; -- 2.34.1