Index: plus1.module
===================================================================
--- plus1.module	(revision 507)
+++ plus1.module	(working copy)
@@ -317,7 +317,7 @@
       }
 
       // Delete votes and results when node is deleted.
-      if (variable_get('plus1_delete_nodes', 1)) {
+      if (variable_get('plus1_delete_nodes', 1) && $node->nid) {
         $criteria = array('content_id' => $node->nid);
         $votes = votingapi_select_votes($criteria);
         if ($votes) {
