Index: src/wp-includes/capabilities-functions.php
===================================================================
--- src/wp-includes/capabilities-functions.php	(revision 34046)
+++ src/wp-includes/capabilities-functions.php	(working copy)
@@ -53,6 +53,12 @@
 		}
 
 		$post_type = get_post_type_object( $post->post_type );
+		if ( ! $post_type ) {
+			/* translators: 1: capability name 2: post type */
+			_doing_it_wrong( 'map_meta_cap', sprintf ( __( '%1$s capability checked againgst a non registerd post-type %2$s' ), $cap, $post->post_type), '4.4' );
+			$cap = 'edit_others_posts';
+			break;
+		}
 
 		if ( ! $post_type->map_meta_cap ) {
 			$caps[] = $post_type->cap->$cap;
@@ -101,6 +107,12 @@
 		}
 
 		$post_type = get_post_type_object( $post->post_type );
+		if ( ! $post_type ) {
+			/* translators: 1: capability name 2: post type */
+			_doing_it_wrong( 'map_meta_cap', sprintf ( __( '%1$s capability checked againgst a non registerd post-type %2$s' ), $cap, $post->post_type), '4.4' );
+			$cap = 'edit_others_posts';
+			break;
+		}
 
 		if ( ! $post_type->map_meta_cap ) {
 			$caps[] = $post_type->cap->$cap;
@@ -143,6 +155,12 @@
 		}
 
 		$post_type = get_post_type_object( $post->post_type );
+		if ( ! $post_type ) {
+			/* translators: 1: capability name 2: post type */
+			_doing_it_wrong( 'map_meta_cap', sprintf ( __( '%1$s capability checked againgst a non registerd post-type %2$s' ), $cap, $post->post_type), '4.4' );
+			$cap = 'edit_others_posts';
+			break;
+		}
 
 		if ( ! $post_type->map_meta_cap ) {
 			$caps[] = $post_type->cap->$cap;
@@ -169,6 +187,12 @@
 	case 'publish_post':
 		$post = get_post( $args[0] );
 		$post_type = get_post_type_object( $post->post_type );
+		if ( ! $post_type ) {
+			/* translators: 1: capability name 2: post type */
+			_doing_it_wrong( 'map_meta_cap', sprintf ( __( '%1$s capability checked againgst a non registerd post-type %2$s' ), $cap, $post->post_type), '4.4' );
+			$cap = 'edit_others_posts';
+			break;
+		}
 
 		$caps[] = $post_type->cap->publish_posts;
 		break;
