Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp') (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 | |||
@@ -286,24 +286,27 @@ UUIDVector OTSDPAttribute::getAllUUIDs() { | |||
286 | if (getType() == UUID) { | 286 | if (getType() == UUID) { |
287 | uuids.resize( uuids.size()+1 ); | 287 | uuids.resize( uuids.size()+1 ); |
288 | uuids[uuids.size()-1] = getUUID(); | 288 | uuids[uuids.size()-1] = getUUID(); |
289 | } else { | 289 | } else { |
290 | AttributeVector * subAttributes = 0 ; | 290 | AttributeVector * subAttributes = 0 ; |
291 | 291 | ||
292 | if (getType() == SEQUENCE) { | 292 | if (getType() == SEQUENCE) { |
293 | subAttributes = getSequence(); | 293 | subAttributes = getSequence(); |
294 | } else if (getType() == ALTERNATIVE) { | 294 | } else if (getType() == ALTERNATIVE) { |
295 | subAttributes = getAlternative(); | 295 | subAttributes = getAlternative(); |
296 | } | 296 | } |
297 | 297 | ||
298 | if (!subAttributes) | ||
299 | return 0; | ||
300 | |||
298 | int os; | 301 | int os; |
299 | for( unsigned int i = 0; i < subAttributes->count(); i++ ) { | 302 | for( unsigned int i = 0; i < subAttributes->count(); i++ ) { |
300 | UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs(); | 303 | UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs(); |
301 | 304 | ||
302 | os = uuids.size(); | 305 | os = uuids.size(); |
303 | uuids.resize( uuids.size()+subUUIDs.count() ); | 306 | uuids.resize( uuids.size()+subUUIDs.count() ); |
304 | 307 | ||
305 | for( unsigned int k = 0; k < subUUIDs.count(); k++ ) { | 308 | for( unsigned int k = 0; k < subUUIDs.count(); k++ ) { |
306 | uuids[os + k] = subUUIDs[k]; | 309 | uuids[os + k] = subUUIDs[k]; |
307 | } | 310 | } |
308 | } | 311 | } |
309 | } | 312 | } |