Skip to content

Commit 48f2530

Browse files
committed
Fix NPE when show confirm dialog
1 parent 9c3f189 commit 48f2530

File tree

1 file changed

+5
-1
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers

1 file changed

+5
-1
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/UIHelperImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ public void run() {
155155
@Override
156156
public boolean showConfirmation(@NotNull String message, @NotNull String title, @NotNull String[] options,
157157
String defaultOption) {
158-
return showConfirmation(null, message, title, options, defaultOption);
158+
return runFromDispatchThread(() -> 0 == Messages.showDialog(message,
159+
title,
160+
options,
161+
ArrayUtils.indexOf(options, defaultOption),
162+
null));
159163
}
160164

161165
@Override

0 commit comments

Comments
 (0)