mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-17 13:15: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())
|
if (dataStore == parent.getDataStore())
|
||||||
{
|
{
|
||||||
String dataElementType = parent.getType();
|
String dataElementType = parent.getType();
|
||||||
if (dataElementType
|
if (dataElementType != null &&
|
||||||
|
(dataElementType
|
||||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) ||
|
.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) ||
|
||||||
dataElementType
|
dataElementType
|
||||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
|
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -209,9 +210,9 @@ public class RemoteFilePropertyChangeListener implements IDomainListener,
|
||||||
|
|
||||||
DataElement subject = (DataElement) children.get(i);
|
DataElement subject = (DataElement) children.get(i);
|
||||||
String type = subject.getType();
|
String type = subject.getType();
|
||||||
if (type
|
if (type != null &&
|
||||||
.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
|
(type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
|
||||||
type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
|
type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)))
|
||||||
|
|
||||||
{
|
{
|
||||||
StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
|
StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
|
||||||
|
|
Loading…
Add table
Reference in a new issue