Index: /Applications/MAMP/htdocs/clients/learningworks/www/sites/all/modules/contrib/feeds/plugins/FeedsNodeProcessor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsNodeProcessor.inc,v
retrieving revision 1.24
diff -u -r1.24 FeedsNodeProcessor.inc
--- FeedsNodeProcessor.inc	23 Feb 2010 22:24:50 -0000	1.24
+++ FeedsNodeProcessor.inc	16 Mar 2010 03:48:24 -0000
@@ -340,7 +340,14 @@
 function _feeds_node_delete($nid) {
 
   $node = node_load($nid);
-
+  if(empty($node)) {
+    watchdog('content', 'Feeds: %nid was not found. Data out of sync. Removed from the feeds_node_item table.', array('%nid' => $nid), WATCHDOG_ERROR);
+    drupal_set_message(t('Feeds: %nid was not found. Data out of sync. Removed from the feeds_node_item table.', array('%nid' => $nid)), 'error');
+    // We need to remove the item from the table also becuase this usually
+    // occurs as a side-effect of nodeapi calls.
+    db_query("DELETE FROM {feeds_node_item} WHERE nid = %d", $nid);
+    return;
+  }
   db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);
   db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);
 
