From 12fc535b4bdc64a9af7e9c43ed1aa752098c3534 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 28 Feb 2012 21:39:43 +0100 Subject: [PATCH] Fix NPE once again --- .../src/com/intellij/openapi/ui/DialogWrapper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index 39747135a2ef..d354f7c1bb09 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -168,8 +168,9 @@ public abstract class DialogWrapper { */ protected DialogWrapper(Project project, boolean canBeParent) { myPeer = createPeer(project, canBeParent); - if (myPeer != null) { - myPeer.getWindow().addComponentListener(new ComponentAdapter() { + final Window window = myPeer.getWindow(); + if (window != null) { + window.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { if (!myResizeInProgress) {