diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/SmartImportTests.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/SmartImportTests.java index de57704c53c..16020d7af58 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/SmartImportTests.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/SmartImportTests.java @@ -157,7 +157,7 @@ private void proceedSmartImportWizard(SmartImportWizard wizard, Consumer okButton.isEnabled(), -1); finishWizard(wizard); } finally { - if (!dialog.getShell().isDisposed()) { + if (dialog.getShell() != null && !dialog.getShell().isDisposed()) { dialog.close(); } }