Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 15401)
+++ wp-includes/link-template.php	(working copy)
@@ -1342,7 +1342,7 @@
  * @param bool $previous Optional, default is true. Whether display link to previous post.
  */
 function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
-	if ( $previous && is_attachment() )
+	if ( $previous && is_attachment() && !empty($GLOBALS['post']->post_parent) )
 		$post = & get_post($GLOBALS['post']->post_parent);
 	else
 		$post = get_adjacent_post($in_same_cat, $excluded_categories, $previous);
