From 35549dbd8b5ee97424a211411ed1a3af4f95e742 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 26 Jul 2013 12:31:14 +0200 Subject: Fix SIGFPE --- bin/gui/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/gui/control.c b/bin/gui/control.c index b8023f7..8b51cc6 100644 --- a/bin/gui/control.c +++ b/bin/gui/control.c @@ -413,7 +413,8 @@ update_current_frame (ThreadData *data) n_max = ring_buffer_get_num_blocks (data->buffer); /* Shift index so that we always show the oldest frames first */ - index = (index + data->n_recorded - n_max) % n_max; + if (n_max > 0) + index = (index + data->n_recorded - n_max) % n_max; ring_buffer_set_current_pointer (data->buffer, index); -- cgit v1.2.3