Index: wp-admin/edit-tags.php
===================================================================
--- wp-admin/edit-tags.php	(revision 18731)
+++ wp-admin/edit-tags.php	(working copy)
@@ -113,10 +113,12 @@
 case 'edit':
 	$title = $tax->labels->edit_item;
 
-	require_once ( 'admin-header.php' );
 	$tag_ID = (int) $_REQUEST['tag_ID'];
 
 	$tag = get_term( $tag_ID, $taxonomy, OBJECT, 'edit' );
+	if ( !$tag )
+		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+	require_once ( 'admin-header.php' );
 	include( './edit-tag-form.php' );
 
 break;
@@ -128,6 +130,9 @@
 	if ( !current_user_can( $tax->cap->edit_terms ) )
 		wp_die( __( 'Cheatin&#8217; uh?' ) );
 
+	if ( !$tag )
+		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+
 	$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
 
 	$location = 'edit-tags.php?taxonomy=' . $taxonomy;
