mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 20:55:44 +02:00
[dstore] null pointer check in property change listener (caught this while debugging)
This commit is contained in:
parent
e5d73be2dc
commit
a197fa8c45
1 changed files with 6 additions and 5 deletions
|
@ -164,10 +164,11 @@ public class RemoteFilePropertyChangeListener implements IDomainListener,
|
|||
if (dataStore == parent.getDataStore())
|
||||
{
|
||||
String dataElementType = parent.getType();
|
||||
if (dataElementType
|
||||
if (dataElementType != null &&
|
||||
(dataElementType
|
||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) ||
|
||||
dataElementType
|
||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
|
||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
|
||||
)
|
||||
{
|
||||
return true;
|
||||
|
@ -209,9 +210,9 @@ public class RemoteFilePropertyChangeListener implements IDomainListener,
|
|||
|
||||
DataElement subject = (DataElement) children.get(i);
|
||||
String type = subject.getType();
|
||||
if (type
|
||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
|
||||
type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
|
||||
if (type != null &&
|
||||
(type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
|
||||
type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)))
|
||||
|
||||
{
|
||||
StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
|
||||
|
|
Loading…
Add table
Reference in a new issue