Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 23294)
+++ wp-admin/includes/template.php	(working copy)
@@ -680,7 +680,7 @@
 	if ( $items ) {
 		foreach ( $items as $item ) {
 			// A page cannot be its own parent.
-			if ( $post->ID && $item->ID == $post->ID )
+			if ( $post && $post->ID && $item->ID == $post->ID )
 				continue;
 
 			$pad = str_repeat( '&nbsp;', $level * 3 );
