Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 22833)
+++ wp-admin/includes/media.php	(working copy)
@@ -383,8 +383,12 @@
  * @param string $editor_id
  */
 function media_buttons($editor_id = 'content') {
+	$post = get_post();
+	if ( ! $post && ! empty( $GLOBALS['post_ID'] ) )
+		$post = $GLOBALS['post_ID'];
+
 	wp_enqueue_media( array(
-		'post' => get_post()
+		'post' => $post
 	) );
 
 	// $context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 22833)
+++ wp-includes/media.php	(working copy)
@@ -1393,6 +1393,7 @@
 		'nonce'     => array(
 			'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ),
 		),
+		'postId'    => 0,
 	);
 
 	$post = null;
