-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.h | 2 |
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 @@ -147,2 +147,3 @@ bool OTGateway::isEnabled() { if( getOTDevice()->deviceNr() >= 0 && + AllDrivers.count() != 0 && driver( getOTDevice()->deviceNr() )->isUp() ) 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 @@ -91,3 +91,3 @@ public : OTDriver * driver( int nr ) - { return AllDrivers[nr]; } + { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } void updateDrivers(); |