Diffstat (limited to 'noncore/settings/networksettings2/opietooth2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp index 9069c09..3fd877f 100644 --- a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp @@ -274,48 +274,51 @@ AttributeVector * OTSDPAttribute::getSequence() { return Value.sequenceVal; } AttributeVector * OTSDPAttribute::getAlternative() { assert(type == ALTERNATIVE); return Value.sequenceVal; } UUIDVector OTSDPAttribute::getAllUUIDs() { UUIDVector uuids; if (getType() == UUID) { uuids.resize( uuids.size()+1 ); uuids[uuids.size()-1] = getUUID(); } else { AttributeVector * subAttributes = 0 ; if (getType() == SEQUENCE) { subAttributes = getSequence(); } else if (getType() == ALTERNATIVE) { subAttributes = getAlternative(); } + if (!subAttributes) + return 0; + int os; for( unsigned int i = 0; i < subAttributes->count(); i++ ) { UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs(); os = uuids.size(); uuids.resize( uuids.size()+subUUIDs.count() ); for( unsigned int k = 0; k < subUUIDs.count(); k++ ) { uuids[os + k] = subUUIDs[k]; } } } return uuids; } static char * Attr2String[] = { "Invalid", "Nil", "UInt", "int", "UUID", "Boolean", "String", "Sequence", |