From e43579be5764d1057982a4941d1068ea1bec3a93 Mon Sep 17 00:00:00 2001
From: anrkaid <mikhail.ivanov@codeyourdream.com>
Date: Wed, 10 Apr 2013 17:45:39 +0700
Subject: [PATCH] "Issue 1966448 by codeyourdream: Added check for successful node_load() to _node_index_node() function."

---
 modules/node/node.module |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/node/node.module b/modules/node/node.module
index f20c229..6ec922a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2774,7 +2774,11 @@ function node_update_index() {
  *   The node to index.
  */
 function _node_index_node($node) {
-  $node = node_load($node->nid);
+  $nid = $node->nid;
+  if(!($node = node_load($nid))) {
+    watchdog('node', t('Can\'t load node @nid during site indexing.'), array('@nid' => $nid), WATCHDOG_WARNING);
+    return;
+  }
 
   // Save the changed time of the most recent indexed node, for the search
   // results half-life calculation.
-- 
1.7.0.4

