From b763d06715ed3a3f1b6da7c54b42a7630cfcd8b8 Mon Sep 17 00:00:00 2001 From: Iulia Vasii Date: Mon, 28 Mar 2016 16:08:00 +0300 Subject: [PATCH] allow Settings page to open in case toolchain is not defined issue #106 Signed-off-by: Iulia Vasii --- .../managedbuild/cross/ui/TabToolchains.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ilg.gnuarmeclipse.managedbuild.cross/src/ilg/gnuarmeclipse/managedbuild/cross/ui/TabToolchains.java b/ilg.gnuarmeclipse.managedbuild.cross/src/ilg/gnuarmeclipse/managedbuild/cross/ui/TabToolchains.java index f2a8404a0..d19d90c3b 100644 --- a/ilg.gnuarmeclipse.managedbuild.cross/src/ilg/gnuarmeclipse/managedbuild/cross/ui/TabToolchains.java +++ b/ilg.gnuarmeclipse.managedbuild.cross/src/ilg/gnuarmeclipse/managedbuild/cross/ui/TabToolchains.java @@ -601,8 +601,12 @@ private void updateControlsForConfig(IConfiguration config) { // .println("Previous toolchain name " + fSelectedToolchainName); if (fSelectedToolchainName != null && fSelectedToolchainName.length() > 0) { - fSelectedToolchainIndex = ToolchainDefinition - .findToolchainByName(fSelectedToolchainName); + try { + fSelectedToolchainIndex = ToolchainDefinition + .findToolchainByName(fSelectedToolchainName); + } catch (IndexOutOfBoundsException e) { + fSelectedToolchainIndex = ToolchainDefinition.getDefault(); + } } else { if (Activator.getInstance().isDebugging()) { System.out.println("No toolchain selected");