From: Benjamin Poirier Date: Wed, 25 Nov 2009 19:58:01 +0000 (-0500) Subject: Don't access stats if they're not activated X-Git-Tag: v0.12.26~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7e39acc69a1d850776219fa4b98d8d7c7afdff6d;p=lttv.git Don't access stats if they're not activated Fixes a bug. Signed-off-by: Benjamin Poirier --- diff --git a/lttv/lttv/sync/event_analysis_eval.c b/lttv/lttv/sync/event_analysis_eval.c index 3c1b110a..88d732bb 100644 --- a/lttv/lttv/sync/event_analysis_eval.c +++ b/lttv/lttv/sync/event_analysis_eval.c @@ -625,8 +625,7 @@ static void analyzeMessageEval(SyncState* const syncState, Message* const message) { AnalysisDataEval* analysisData= syncState->analysisData; - MessageStats* messageStats= - &analysisData->stats->messageStats[message->outE->traceNum][message->inE->traceNum]; + MessageStats* messageStats; double* rtt; double tt; struct RttKey rttKey; @@ -635,6 +634,8 @@ static void analyzeMessageEval(SyncState* const syncState, Message* const if (syncState->stats) { + messageStats= + &analysisData->stats->messageStats[message->outE->traceNum][message->inE->traceNum]; messageStats->total++; }