summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
authorerik <erik>2007-02-08 01:45:16 (UTC)
committer erik <erik>2007-02-08 01:45:16 (UTC)
commit2e497f7cae45184184e2416114887095735958f5 (patch) (side-by-side diff)
treea6b399d9bce5854dc7ad6c985b48965cf20680b0 /noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
parent853b61f97e718359bef95147ab3c7beb0705acda (diff)
downloadopie-2e497f7cae45184184e2416114887095735958f5.zip
opie-2e497f7cae45184184e2416114887095735958f5.tar.gz
opie-2e497f7cae45184184e2416114887095735958f5.tar.bz2
Each file in this commit has a problem where it is possible to dereference
a pointer without that pointer being valid. This commit fixes each instance of that.
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
@@ -295,6 +295,9 @@ UUIDVector OTSDPAttribute::getAllUUIDs() {
subAttributes = getAlternative();
}
+ if (!subAttributes)
+ return 0;
+
int os;
for( unsigned int i = 0; i < subAttributes->count(); i++ ) {
UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs();