1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

check for deleted items to avoid null pointer

This commit is contained in:
David McKnight 2007-01-23 18:50:50 +00:00
parent 61cbdb14c7
commit c3698a5f78

View file

@ -1674,18 +1674,21 @@ private DataElement createDataElementFromLSString(DataElement subject,
for (int f = 0; f < children.size(); f++)
{
DataElement child = (DataElement)children.get(f);
String type = child.getType();
if (type.equals(UNIVERSAL_FILE_DESCRIPTOR) || type.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
if (!child.isDeleted())
{
if (StringCompare.compare(filter, child.getName(), false))
String type = child.getType();
if (type.equals(UNIVERSAL_FILE_DESCRIPTOR) || type.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
{
if (StringCompare.compare(filter, child.getName(), false))
{
filteredChildren.add(child);
}
}
else
{
filteredChildren.add(child);
}
}
else
{
filteredChildren.add(child);
}
}