Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 17488)
+++ wp-includes/query.php	(working copy)
@@ -2185,7 +2185,7 @@
 				if ( !empty( $cat_query ) ) {
 					$cat_query = reset( $cat_query );
 					$the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' );
-					if ( $the_cat ) {
+					if ( $the_cat && !is_wp_error( $the_cat ) ) {
 						$this->set( 'cat', $the_cat->term_id );
 						$this->set( 'category_name', $the_cat->slug );
 					}
