Index: category.php
===================================================================
--- category.php	(revision 12592)
+++ category.php	(working copy)
@@ -178,11 +178,13 @@
  * @since 1.0.0
  *
  * @param int $cat_id Category ID
- * @return string Category name
+ * @return string|null Category name, or null if category doesn't exist.
  */
 function get_cat_name( $cat_id ) {
 	$cat_id = (int) $cat_id;
 	$category = &get_category( $cat_id );
+	if ( ! $category || is_wp_error( $category ) )
+		return null;
 	return $category->name;
 }
 
