From 90443881030a2105971139edeb8cd2e598090e77 Mon Sep 17 00:00:00 2001 From: "Svetlana.Zemlyanskaya" Date: Thu, 26 Nov 2015 11:40:40 +0100 Subject: [PATCH] EA-73299 - NPE: ArrangementAtomMatchConditionComponent$.paint --- .../component/ArrangementAtomMatchConditionComponent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/component/ArrangementAtomMatchConditionComponent.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/component/ArrangementAtomMatchConditionComponent.java index 04c0f2dc1726..0c6b6ef4ba81 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/component/ArrangementAtomMatchConditionComponent.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/component/ArrangementAtomMatchConditionComponent.java @@ -183,8 +183,8 @@ public class ArrangementAtomMatchConditionComponent implements ArrangementUiComp public void paint(Graphics g) { Rectangle buttonBounds = getCloseButtonScreenBounds(); if (buttonBounds != null) { - Point mouseScreenLocation = MouseInfo.getPointerInfo().getLocation(); - myCloseButtonHovered = buttonBounds.contains(mouseScreenLocation); + final PointerInfo info = MouseInfo.getPointerInfo(); + myCloseButtonHovered = info != null && buttonBounds.contains(info.getLocation()); } Rectangle bounds = getBounds();