From 191948285b5728792d07ceda38a89beab2f54bce Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 13 Sep 2020 07:39:00 -0700 Subject: [PATCH] fix undefined variable reference --- lib/Perl/Tidy/Formatter.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index b13c4a5a..2cba7e0c 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -16464,6 +16464,7 @@ sub set_nobreaks { # ... with the corresponding opening brace on the same line my $type_sequence = $rLL->[$K_end]->[_TYPE_SEQUENCE_]; my $K_opening = $K_opening_container->{$type_sequence}; + next unless ( defined($K_opening) ); my $i_opening = $i_beg + ( $K_opening - $K_beg ); next if ( $i_opening < $i_beg ); @@ -18557,6 +18558,8 @@ sub insert_additional_breaks { my $line_number = 0; foreach my $i_break_left ( sort { $a <=> $b } @{$ri_break_list} ) { + next if ( $nobreak_to_go[$i_break_left] ); + $i_f = $ri_first->[$line_number]; $i_l = $ri_last->[$line_number]; while ( $i_break_left >= $i_l ) { -- 2.39.5