Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 28462)
+++ wp-includes/query.php	(working copy)
@@ -3707,7 +3707,7 @@
 			$page_for_posts = get_option('page_for_posts');
 			$this->queried_object = get_post( $page_for_posts );
 			$this->queried_object_id = (int) $this->queried_object->ID;
-		} elseif ( $this->is_singular && !is_null($this->post) ) {
+		} elseif ( $this->is_singular && isset( $this->post ) && !is_null( $this->post ) ) {
 			$this->queried_object = $this->post;
 			$this->queried_object_id = (int) $this->post->ID;
 		} elseif ( $this->is_author ) {
