Changeset 1393 in ntrip for trunk/BNC/bncnetqueryv2.cpp


Ignore:
Timestamp:
Dec 29, 2008, 11:36:45 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryv2.cpp

    r1392 r1393  
    4040////////////////////////////////////////////////////////////////////////////
    4141void bncNetQueryV2::stop() {
    42   _eventLoop->quit();
    43   this->deleteLater();
     42  if (_reply) {
     43    _reply->disconnect();
     44    _reply->abort();
     45  }
     46  if (_eventLoop) {
     47    _eventLoop->quit();
     48    delete _eventLoop;
     49    _eventLoop = 0;
     50  }
    4451}
    4552
     
    4956  _status = error;
    5057  emit newMessage(_reply->errorString().toAscii(), true);
    51   _eventLoop->quit();
     58  if (_eventLoop) {
     59    _eventLoop->quit();
     60  }
    5261}
    5362
     
    122131  // Wait Loop
    123132  // ---------
    124   _eventLoop->exec();
     133  if (_eventLoop) {
     134    _eventLoop->exec();
     135  }
    125136
    126137  // Copy Data and Return
     
    136147  // ---------
    137148  if (!_reply->bytesAvailable()) {
    138     _eventLoop->exec();
     149    if (_eventLoop) {
     150      _eventLoop->exec();
     151    }
    139152  }
    140153
Note: See TracChangeset for help on using the changeset viewer.