--- a/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm +++ b/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm @@ -295,6 +295,17 @@ sub _initialise_options { ## no critic (ProhibitExcessComplexity) if ( $opt->{constraint}{quant} ) { $step = $opt->{constraint}{quant}; } + if ( $opt->{constraint}{min} > $opt->{constraint}{max} ) { + $logger->error( + sprintf __( +"Ignoring scan option '%s', minimum range (%s) > maximum (%s)" + ), + $opt->{name}, + $opt->{constraint}{min}, + $opt->{constraint}{max} + ); + next; + } $widget = Gtk3::SpinButton->new_with_range( $opt->{constraint}{min}, $opt->{constraint}{max}, $step );