EA-89520 - NPE: SwingHelper.adjustDialogSizeToFitPreferredSize appcode/163.5881 clion/163.5879 dbe/163.5880 idea/163.5874 phpstorm/163.5876 pycharm/163.5875 pycharm/163.5877 webstorm/163.5887
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 6 Oct 2016 20:58:16 +0000 (23:58 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 6 Oct 2016 20:58:16 +0000 (23:58 +0300)
platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java

index 3200bf9f471cdad6a6aa5e00aa7559c346014d90..617fce5e27810c0ef48ad0aa46b5fc2f4f188a93 100644 (file)
@@ -192,6 +192,7 @@ public class SwingHelper {
 
   public static void adjustDialogSizeToFitPreferredSize(@NotNull DialogWrapper dialogWrapper) {
     JRootPane rootPane = dialogWrapper.getRootPane();
+    if (rootPane == null) return;
     Dimension componentSize = rootPane.getSize();
     Dimension componentPreferredSize = rootPane.getPreferredSize();
     if (componentPreferredSize.width <= componentSize.width && componentPreferredSize.height <= componentSize.height) {