texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7573] check if hash key is defined


From: gavinsmith0123
Subject: [7573] check if hash key is defined
Date: Sun, 25 Dec 2016 12:42:56 +0000 (UTC)

Revision: 7573
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7573
Author:   gavin
Date:     2016-12-25 12:42:56 +0000 (Sun, 25 Dec 2016)
Log Message:
-----------
check if hash key is defined

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2016-12-25 12:33:29 UTC (rev 7572)
+++ trunk/ChangeLog     2016-12-25 12:42:56 UTC (rev 7573)
@@ -1,5 +1,10 @@
 2016-12-25  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_parse_texi) <@menu> Check if parent
+       command is defined before using it as a hash key.
+
+2016-12-25  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/ModulePath.pm.in (init): Take extra argument 'updirs'
        allowing to find 'top_srcdir' from the path of the currently
        running Perl script.

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2016-12-25 12:33:29 UTC (rev 7572)
+++ trunk/tp/Texinfo/Parser.pm  2016-12-25 12:42:56 UTC (rev 7573)
@@ -4812,7 +4812,8 @@
                                 $line_nr);
                     }
                   } elsif ($command eq 'menu') {
-                    if ($root_commands{$current->{'parent'}->{'cmdname'}}) {
+                    if (!(defined $current->{'parent'}->{'cmdname'})
+                        or $root_commands{$current->{'parent'}->{'cmdname'}}) {
                       push @{$self->{'current_node'}->{'menus'}}, $current;
                     } else {
                       $self->line_warn($self->__("address@hidden in invalid 
context"), 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]