Don't access stats if they're not activated
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Wed, 25 Nov 2009 19:58:01 +0000 (14:58 -0500)
committerBenjamin Poirier <benjamin.poirier@polymtl.ca>
Fri, 18 Dec 2009 19:04:17 +0000 (14:04 -0500)
Fixes a bug.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/sync/event_analysis_eval.c

index 3c1b110aeeee1e7f766cd7805952b60694c90566..88d732bb4bbace6ec012a687a3f3faf49776db7b 100644 (file)
@@ -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++;
        }
 
This page took 0.024424 seconds and 4 git commands to generate.