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:
parent
61cbdb14c7
commit
c3698a5f78
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue