author | zecke <zecke> | 2005-01-09 16:27:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-01-09 16:27:40 (UTC) |
commit | ebd352b30b5b0278e613e1d1ecc60a5fc7756961 (patch) (side-by-side diff) | |
tree | 0a7967a8cf668bf06fd949fbc7e1c9c33043fc60 /noncore/settings/networksettings2/opietooth2/OTGateway.h | |
parent | c6432d421a0ec3d158bf40309e98fc0386c4a287 (diff) | |
download | opie-ebd352b30b5b0278e613e1d1ecc60a5fc7756961.zip opie-ebd352b30b5b0278e613e1d1ecc60a5fc7756961.tar.gz opie-ebd352b30b5b0278e613e1d1ecc60a5fc7756961.tar.bz2 |
-Do not access the Array out of bounds
-Check that there is a driver before asking
to query a non existant
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h index d97ef35..11c6b30 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.h +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h @@ -90,5 +90,5 @@ public : { return AllDrivers; } OTDriver * driver( int nr ) - { return AllDrivers[nr]; } + { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } void updateDrivers(); |