summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index fc30bf8..e23fc9c 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -423,49 +423,49 @@ OTScan::OTScan( QWidget * parent, OTIcons * _IC ) :
}
OTScan::~OTScan() {
if( MyIcons )
delete Icons;
OTGateway::releaseOTGateway();
// send all peers that we do not care about states
QListViewItem * Lit = DetectedPeers_LV->firstChild();
while( Lit ) {
((PeerLVI *)Lit)->peer()->stopFindingOutState( );
Lit = Lit->nextSibling();
}
}
// static scan dialog function
int OTScan::getDevice( OTPeer *& Peer,
int & Channel,
OTGateway * OT,
const UUIDVector & Filter,
QWidget* Parent ) {
bool IsUp = 0;
unsigned int i;
- if( ! OT->isEnabled() ) {
+ if( ! OT || ! OT->isEnabled() ) {
QMessageBox::warning( 0,
tr("Scanning problem"),
tr("Bluetooth not enabled" )
);
return QDialog::Rejected;
}
// check if bluetooth is up
OTDriverList & DL = OT->getDriverList();
for( i = 0;
i < DL.count();
i ++ ) {
if( DL[i]->isUp() ) {
// one device that is up found
IsUp = 1;
break;
}
}
// use this driver
OT->setScanWith( OT->driver(i) );
// create dialog
QDialog * Dlg = new QDialog( Parent, 0, TRUE );