]> git.donarmstrong.com Git - perltidy.git/commitdiff
fixed undefined var introduced in recent update
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 4 Oct 2020 00:44:30 +0000 (17:44 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 4 Oct 2020 00:44:30 +0000 (17:44 -0700)
lib/Perl/Tidy/Formatter.pm

index 36722ea3b241c61f52677fd820225dee53810f7a..79231d5bca2c42ff53eaf5953413bee2b0c4b167 100644 (file)
@@ -6819,12 +6819,15 @@ sub bli_adjustment {
         if ( $block_type && $block_type =~ /$bli_pattern/ ) {
             my $seqno     = $rLL->[$KK]->[_TYPE_SEQUENCE_];
             my $K_opening = $K_opening_container->{$seqno};
-            if ( $KK eq $K_opening ) {
-                $rLL->[$KK]->[_CI_LEVEL_]++;
-                $ris_bli_container->{$seqno} = 1;
-            }
-            else {
-                $rLL->[$KK]->[_CI_LEVEL_] = $rLL->[$K_opening]->[_CI_LEVEL_];
+            if ( defined($K_opening) ) {
+                if ( $KK eq $K_opening ) {
+                    $rLL->[$KK]->[_CI_LEVEL_]++;
+                    $ris_bli_container->{$seqno} = 1;
+                }
+                else {
+                    $rLL->[$KK]->[_CI_LEVEL_] =
+                      $rLL->[$K_opening]->[_CI_LEVEL_];
+                }
             }
         }
     }