1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-06 08:35:26 +02:00

Fix array out of bounds exception in ContainerPropertyTab

- in Connection combo modify listener, just return if the
  Connection combo doesn't have a selection and set
  connection to null and connection name to empty string

Change-Id: Ib6274eb27b9a3128a538da4df520b7b83ce1e575
This commit is contained in:
Jeff Johnston 2017-03-14 13:03:08 -04:00
parent 832347339c
commit ed2768aa50

View file

@ -67,6 +67,11 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
@Override @Override
public void modifyText(ModifyEvent e) { public void modifyText(ModifyEvent e) {
int index = connectionSelector.getSelectionIndex(); int index = connectionSelector.getSelectionIndex();
if (index < 0) {
connection = null;
connectionName = "";
return;
}
if (connection != null) if (connection != null)
connection.removeImageListener(containerTab); connection.removeImageListener(containerTab);
connection = connections[index]; connection = connections[index];