summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.cpp1
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
index e8137dd..1b61a2e 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
@@ -144,8 +144,9 @@ bool OTGateway::needsEnabling() {
}
bool OTGateway::isEnabled() {
if( getOTDevice()->deviceNr() >= 0 &&
+ AllDrivers.count() != 0 &&
driver( getOTDevice()->deviceNr() )->isUp() )
return TRUE;
// else check system
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
@@ -88,9 +88,9 @@ public :
OTDriverList & getDriverList()
{ return AllDrivers; }
OTDriver * driver( int nr )
- { return AllDrivers[nr]; }
+ { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; }
void updateDrivers();
PANConnectionVector getPANConnections();