From ebd352b30b5b0278e613e1d1ecc60a5fc7756961 Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 09 Jan 2005 16:27:40 +0000 Subject: -Do not access the Array out of bounds -Check that there is a driver before asking to query a non existant --- (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.h') 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 @@ -89,7 +89,7 @@ public : OTDriverList & getDriverList() { return AllDrivers; } OTDriver * driver( int nr ) - { return AllDrivers[nr]; } + { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } void updateDrivers(); PANConnectionVector getPANConnections(); -- cgit v0.9.0.2