mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-89520 - NPE: SwingHelper.adjustDialogSizeToFitPreferredSize
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user