[gtk-doc] mkdb: fix perl warning from accesing undefined hash entries



commit 32fe933cc767c7d1555a1873d6b2fcc2cbb5e1e5
Author: Stefan Kost <ensonic users sf net>
Date:   Mon Jul 12 23:42:49 2010 +0300

    mkdb: fix perl warning from accesing undefined hash entries
    
    We don't have type declarations for everything. Accessing the hash will cause
    a warning in that case. Check if it is defined.

 gtkdoc-mkdb.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 2230a8f..14087b4 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -931,7 +931,10 @@ sub OutputIndex {
         my $symbol_desc = "";
         my $symbol_section = "";
         my $symbol_section_id = "";
-        my $symbol_type = lc($DeclarationTypes{$symbol});
+        my $symbol_type = "";
+        if (defined($DeclarationTypes{$symbol})) {
+          $symbol_type = lc($DeclarationTypes{$symbol});
+        }
         if ($symbol_type eq "") {
             #print "trying symbol $symbol\n";
             if ($symbol =~ m/(.*)::(.*)/) {



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