From a2331fa0f3390c29cee40007f69f14fa1d216707 Mon Sep 17 00:00:00 2001 From: yangxx Date: Wed, 20 Aug 2003 15:16:01 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@182 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/event.c | 1 + ltt/branches/poly/ltt/type.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index e26eb451..ad7e6c33 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -136,6 +136,7 @@ LttField *ltt_event_field(LttEvent *e) LttEventType * event_type = ltt_event_eventtype(e); if(!event_type) return NULL; field = event_type->root_field; + if(!field) return NULL; //check if the field need refresh if(e->which_block != event_type->latest_block || diff --git a/ltt/branches/poly/ltt/type.c b/ltt/branches/poly/ltt/type.c index 710803de..a2c73f22 100644 --- a/ltt/branches/poly/ltt/type.c +++ b/ltt/branches/poly/ltt/type.c @@ -93,6 +93,7 @@ unsigned ltt_eventtype_id(LttEventType *et) LttType *ltt_eventtype_type(LttEventType *et) { + if(!et->root_field) return NULL; return et->root_field->field_type; } @@ -311,6 +312,7 @@ LttField *ltt_field_member(LttField *f, unsigned i) LttType *ltt_field_type(LttField *f) { + if(!f)return NULL; return f->field_type; } -- 2.34.1