From 70e35d97255168f3832cf9c0da513eabeefffc5a Mon Sep 17 00:00:00 2001 From: Alexey Utkin Date: Wed, 21 Aug 2019 17:43:47 +0300 Subject: [PATCH] CPP-17180 Create featured lazy icons in breadcrumbs - fix NPE GitOrigin-RevId: 1cc8f17e7ecf66601c8a228bcc5271cee85bee6c --- .../ui/components/breadcrumbs/Breadcrumbs.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/components/breadcrumbs/Breadcrumbs.java b/platform/platform-api/src/com/intellij/ui/components/breadcrumbs/Breadcrumbs.java index b6aeb46b2160..fdb34dc02d1f 100644 --- a/platform/platform-api/src/com/intellij/ui/components/breadcrumbs/Breadcrumbs.java +++ b/platform/platform-api/src/com/intellij/ui/components/breadcrumbs/Breadcrumbs.java @@ -379,8 +379,14 @@ public class Breadcrumbs extends JBPanelWithEmptyText { private void update() { icon = crumb.getIcon(); - crumbIconWidth = icon.getIconWidth(); - crumbIconHeight = icon.getIconHeight(); + if (icon != null) { + crumbIconWidth = icon.getIconWidth(); + crumbIconHeight = icon.getIconHeight(); + } + else { + crumbIconWidth = 0; + crumbIconHeight = 0; + } text = crumb.getText(); font = getFont(crumb); foreground = getForeground(crumb);