Index: post.php
===================================================================
--- post.php	(revision 18378)
+++ post.php	(working copy)
@@ -5179,7 +5179,9 @@
 function set_post_thumbnail( $post, $thumbnail_id ) {
 	$post = get_post( $post );
 	$thumbnail_id = absint( $thumbnail_id );
-	if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
+	if ( $post && $thumbnail_id == 0 ) {
+		delete_post_meta( $post->ID, '_thumbnail_id' );
+	} else if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
 		$thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' );
 		if ( ! empty( $thumbnail_html ) ) {
 			update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
