From e59204165afafafb5f4ef82ef963aa5be42f372a Mon Sep 17 00:00:00 2001 From: Alexandr Trushev Date: Wed, 3 Apr 2024 10:11:47 +0200 Subject: [PATCH] IJPL-449 IDEA-349643 Fix for issue with NPE while drawing shadow under sticky lines panel GitOrigin-RevId: 1c9a07ac15cf58080375d9119042433bfccf409c --- .../openapi/editor/impl/stickyLines/StickyLineShadowPainter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/stickyLines/StickyLineShadowPainter.kt b/platform/platform-impl/src/com/intellij/openapi/editor/impl/stickyLines/StickyLineShadowPainter.kt index cdf8996c5fe0..a640ed0e18ea 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/stickyLines/StickyLineShadowPainter.kt +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/stickyLines/StickyLineShadowPainter.kt @@ -35,7 +35,7 @@ internal class StickyLineShadowPainter { fun updateShadow(c: JComponent, newWidth: Int, newHeight: Int) { if (!isEnabled()) return - if (newWidth == 0 || newHeight == 0) { + if (newWidth == 0 || newHeight == 0 || c.graphicsConfiguration == null) { shadow = null } else if (shadow == null || width != newWidth || height != newHeight) { // paint 1/2 of icon as a workaround on rendering issue with Shadow.Bottom