From 87db6fbb79d3141248831db78b0683222942aaec Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 15 Jul 2011 18:42:00 -0400 Subject: [PATCH 1/1] only check for held attachments when operating on an attachment --- IkiWiki/Plugin/remove.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5