only check for held attachments when operating on an attachment

master
Joey Hess 2011-07-15 18:42:00 -04:00
parent aef85a247a
commit 87db6fbb79
1 changed files with 1 additions and 1 deletions

View File

@ -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;