summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp3
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
@@ -286,24 +286,27 @@ UUIDVector OTSDPAttribute::getAllUUIDs() {
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];
}
}
}