aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/remove.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/remove.pm')
-rw-r--r--IkiWiki/Plugin/remove.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index b94447020..14ac01c9b 100644
--- a/IkiWiki/Plugin/remove.pm
+++ b/IkiWiki/Plugin/remove.pm
@@ -120,10 +120,9 @@ 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) {
- print STDERR "!! remove $f\n";
require IkiWiki::Render;
IkiWiki::prune($f);
}