From 37e0fbe6b93ae83c47a6868aaadbb4500dec6a5d Mon Sep 17 00:00:00 2001 From: Ilia Zakoulov Date: Mon, 3 Nov 2025 14:44:26 +0100 Subject: [PATCH] GO-19393: getFirstChild throws an exception if child count is 0 GitOrigin-RevId: cd52afbc6650e3d0edbfa7a2db6f6ab5c5020041 --- .../welcomeScreen/recentProjects/RecentProjectFilteringTree.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/recentProjects/RecentProjectFilteringTree.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/recentProjects/RecentProjectFilteringTree.kt index 7f7cf1220ea6..87a4dd89cbb6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/recentProjects/RecentProjectFilteringTree.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/recentProjects/RecentProjectFilteringTree.kt @@ -217,6 +217,9 @@ class RecentProjectFilteringTree( return true } + if (root.childCount <= 0) { + return false + } val firstChild = root.firstChild if (firstChild != null) { TreeUtil.selectNode(tree, firstChild)