From 4960248e89b3083ebdeddbfdef6bea83ad5225c8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 13 Jul 2021 13:09:09 +0200 Subject: GUI: Reject infinite resolution limits for FoM --- src/gui_fom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui_fom.c b/src/gui_fom.c index 66de3e13..8418419a 100644 --- a/src/gui_fom.c +++ b/src/gui_fom.c @@ -323,7 +323,9 @@ static void fom_response_sig(GtkWidget *dialog, gint resp, f->proj->fom_nbins = get_uint(f->num_bins); if ( isnan(f->proj->fom_res_min) || isnan(f->proj->fom_res_max) - || isnan(f->proj->fom_min_snr) ) + || isnan(f->proj->fom_min_snr) + || isinf(f->proj->fom_res_min) + || isinf(f->proj->fom_res_max) ) { ERROR("Invalid parameters\n"); return; -- cgit v1.2.3