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-Url: http://git.tremily.us/?a=commitdiff_plain;h=87db6fbb79d3141248831db78b0683222942aaec;p=ikiwiki.git 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;