Index: comment_upload.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_upload/comment_upload.module,v
retrieving revision 1.6.2.6
diff -u -p -r1.6.2.6 comment_upload.module
--- comment_upload.module	26 Jan 2007 17:46:55 -0000	1.6.2.6
+++ comment_upload.module	27 Jan 2007 11:51:29 -0000
@@ -260,10 +260,12 @@ function theme_comment_attachments($file
   if (variable_get('comment_upload_inline_image', 0)) {
     $regex = '/\.('. ereg_replace(' +', '|', preg_quote('jpg jpeg gif png')) .')$/i';
     foreach ($files as $key => $file) {
-      if (preg_match($regex, $file->filename)) {
-        unset($files[$key]);
-        $href = check_url(strpos($file->fid, 'upload') === false ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path())));
-        $html .= '<img src="'. $href .'" title="'. check_plain($file->description) . '"/>';
+      if ($file->list) {
+        if (preg_match($regex, $file->filename)) {
+          unset($files[$key]);
+          $href = check_url(strpos($file->fid, 'upload') === false ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path())));
+          $html .= '<img src="'. $href .'" title="'. check_plain($file->description) . '"/>';
+        }
       }
     }
   }
