Index: modules/flashvideo/flashvideo.module
===================================================================
--- modules/flashvideo/flashvideo.module	(revision 607)
+++ modules/flashvideo/flashvideo.module	(working copy)
@@ -1550,10 +1550,11 @@
     $cck_finished_video_field_db_info = content_database_info($cck_finished_video_field);
     $cck_finished_thumbnail_field_db_info = content_database_info($cck_finished_thumbnail_field);
     // If they removed at least one file from the node...
-    if (count($node->$cck_original_video_field['field_name']) < count($node->$cck_finished_video_field['field_name'])) {
+    if (count(array_filter($node->$cck_original_video_field['field_name'])) < count(array_filter($node->$cck_finished_video_field['field_name']))) {
       // Figure out which file(s) was removed.
       $removed_files = db_query("SELECT * FROM {flashvideo} WHERE fid NOT IN (SELECT fid FROM {files}) AND nid = %d", $node->nid);
       while ($removed_file = db_fetch_object($removed_files)) {
+dsm($removed_file);
         // Find the files referenced by this file being removed.
         $files = db_query("SELECT * FROM {flashvideo} fv LEFT JOIN {files} f ON f.fid=fv.fid WHERE fv.oid = %d", $removed_file->fid);
         // Delete the file record from the flashvideo tables.
@@ -2557,4 +2558,4 @@
     $files[$file->fid] = $file;
   }
   return $files;
-}
\ No newline at end of file
+}
