IJPL-449 IDEA-349643 Fix for issue with NPE while drawing shadow under sticky lines panel

GitOrigin-RevId: 1c9a07ac15cf58080375d9119042433bfccf409c
This commit is contained in:
Alexandr Trushev
2024-04-03 10:24:37 +00:00
committed by intellij-monorepo-bot
parent b0c5f1e474
commit e59204165a
@@ -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