From 6ede2c036dd0520562bbeb31e02dfdc938403921 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 30 Jul 2016 16:09:18 +0200 Subject: [PATCH] Fix possible crash if no buttons are active (should never be the case) Found by cppcheck --- src/ui/gui/psppire-val-chooser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ui/gui/psppire-val-chooser.c b/src/ui/gui/psppire-val-chooser.c index 25a34f1275..2ff3f188c7 100644 --- a/src/ui/gui/psppire-val-chooser.c +++ b/src/ui/gui/psppire-val-chooser.c @@ -612,11 +612,10 @@ psppire_val_chooser_get_status (PsppireValChooser *vr, struct old_value *ov) { if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (vr->rw[i].rb))) { + range_opt[i].set (vr, ov, &vr->rw[i]); break; } } - - range_opt[i].set (vr, ov, &vr->rw[i]); } /* This might need to be changed to something less naive. -- 2.30.2