From faec23f6bd3fdd6052e0140b1028df52cd823101 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 5 Apr 2011 16:32:50 +0200 Subject: [PATCH] Don't update empty sourcestats on clock update --- sourcestats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sourcestats.c b/sourcestats.c index 7a7d3e8..ec34b8d 100644 --- a/sourcestats.c +++ b/sourcestats.c @@ -619,6 +619,9 @@ SST_SlewSamples(SST_Stats inst, struct timeval *when, double dfreq, double doffs struct timeval *sample, prev; double prev_offset, prev_freq; + if (!inst->n_samples) + return; + for (m = -inst->runs_samples; m < inst->n_samples; m++) { i = get_runsbuf_index(inst, m); sample = &(inst->sample_times[i]);