Hi, I've got a problem with my HttpClient, when I'm trying to stop/cancel request my application crashes... How can I cancel it properly ?

After when I'm trying to stop by this function:
Qt Code:
  1. void HttpClient::stop(){
  2. if(m_reply) {
  3. m_reply->abort();
  4. }
  5. }
To copy to clipboard, switch view to plain text mode 

it crashes on: loop.exec();

in function 'wait for finish'...

Qt Code:
  1. void HttpClient::waitForFinish(QNetworkReply *reply)
  2. {
  3. QEventLoop loop;
  4. connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
  5. loop.exec();
  6. }
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. QString HttpClient::get(const QString &url)
  2. {
  3. if(url.isEmpty()){
  4. Logger::getInstance()->Error(trUtf8("HttpClient: GET Response <Url is empty!>"));
  5. }
  6. m_reply = m_manager->get(*this->generateRequest(url, false));
  7. waitForFinish(m_reply);
  8. if(!m_reply){
  9. return "";
  10. }
  11.  
  12. ... code
To copy to clipboard, switch view to plain text mode 

This problem occurs sometimes, not always. I think that if, in another thread still performs and here is aborted it causes this crash...
Any idea ?

Thanks for any help