From: Joey Hess <joey@kodama.kitenet.net>
Date: Sun, 15 Jun 2008 22:10:47 +0000 (-0400)
Subject: check that parent hash exists, to avoid creating it
X-Git-Tag: 2.51~77
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/ce029bfe044445d3d1fc10926c2ab6b9305753e0

check that parent hash exists, to avoid creating it
---

diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index f7ab291c7..22f75b9e5 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -26,6 +26,7 @@ sub preprocess (@) { #{{{
 	foreach my $page (keys %pagesources) {
 		if (pagespec_match($page, $params{pages}, location => $params{page})) {
 			if (exists $params{show} && 
+			    exists $pagestate{$page} &&
 			    exists $pagestate{$page}{meta}{$params{show}}) {
 				$mapitems{$page}=$pagestate{$page}{meta}{$params{show}};
 			}