diff --git src/wp-admin/includes/class-wp-comments-list-table.php src/wp-admin/includes/class-wp-comments-list-table.php
index a11eefc873..206e1b6823 100644
--- src/wp-admin/includes/class-wp-comments-list-table.php
+++ src/wp-admin/includes/class-wp-comments-list-table.php
@@ -538,6 +538,8 @@ class WP_Comments_List_Table extends WP_List_Table {
 	}
 
 	/**
+	 * @since 5.4.0 Do not display comments for post types that are no longer registered.
+	 *
 	 * @global WP_Post    $post    Global post object.
 	 * @global WP_Comment $comment Global comment object.
 	 *
@@ -557,6 +559,15 @@ class WP_Comments_List_Table extends WP_List_Table {
 		if ( $comment->comment_post_ID > 0 ) {
 			$post = get_post( $comment->comment_post_ID );
 		}
+
+		// Check if post type exists or not
+		$post_type_object = get_post_type_object( $post->post_type );
+
+		// Early exit, if the post type doesn't exists.
+		if ( null === $post_type_object ) {
+			return;
+		}
+
 		$this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );
 
 		echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
