summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
index 2d13ce9..6531cf6 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
@@ -147,55 +147,55 @@ bool OTGateway::isEnabled() {
if( getOTDevice()->deviceNr() >= 0 &&
driver( getOTDevice()->deviceNr() )->isUp() )
return TRUE;
// else check system
return getOTDevice()->isAttached();
}
void OTGateway::SLOT_ShowError( const QString & S ) {
owarn << S << oendl;
if( ErrorConnectCount > 0 ) {
// pass error
emit error( QString( "<p>" ) + S + "</p>" );
return;
}
QMessageBox::warning( 0,
tr("OTGateway error"),
S );
}
void OTGateway::connectNotify( const char * S ) {
- if( strcmp( S, "error(const QString&)" ) == 0 ) {
+ if( S && strcmp( S, "error(const QString&)" ) == 0 ) {
ErrorConnectCount ++;
}
}
void OTGateway::disconnectNotify( const char * S ) {
- if( strcmp( S, "error(const QString&)" ) == 0 ) {
+ if( S && strcmp( S, "error(const QString&)" ) == 0 ) {
ErrorConnectCount --;
}
}
void OTGateway::timerEvent( QTimerEvent * ) {
OTDriver * D;
unsigned int oldc = AllDrivers.count();
bool old;
AllDrivers.update();
if( oldc != AllDrivers.count() ) {
updateDrivers();
} else {
for( unsigned int i = 0;
i < AllDrivers.count();
i ++ ) {
D = AllDrivers[i];
old = D->isUp();
if( D->currentState() >= 0 ) {
if( old != D->isUp() ) {
emit stateChange( D, D->isUp() );
}