From: Joey Hess Date: Fri, 15 Jul 2011 22:42:00 +0000 (-0400) Subject: only check for held attachments when operating on an attachment X-Git-Tag: 3.20110715~3 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/87db6fbb79d3141248831db78b0683222942aaec?ds=inline;hp=aef85a247a4a9fbfe61225324f5efb462de52a6a only check for held attachments when operating on an attachment --- diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index a58f87fb3..14ac01c9b 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -120,7 +120,7 @@ sub removal_confirm ($$@) { # Special case for unsaved attachments. foreach my $page (@pages) { - if (IkiWiki::Plugin::attachment->can("is_held_attachment")) { + if ($attachment && IkiWiki::Plugin::attachment->can("is_held_attachment")) { my $f=IkiWiki::Plugin::attachment::is_held_attachment($page); if (defined $f) { require IkiWiki::Render;