Skip to content
Permalink
Browse files

network authentication: don't crash if a network request is closed wh…

…ile the credentials dialog is open (fixes #9379)
  • Loading branch information
jef-n committed Feb 17, 2014
1 parent 7becd76 commit 7c4c7e897e145eb38ea90be1bf8989e09bec698c
Showing with 5 additions and 1 deletion.
  1. +3 −0 src/app/qgisapp.cpp
  2. +2 −1 src/core/qgsnetworkaccessmanager.cpp
@@ -9474,6 +9474,9 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
if ( !ok )
return;

if( reply->isFinished() )
return;

auth->setUser( username );
auth->setPassword( password );
}
@@ -183,7 +183,8 @@ void QgsNetworkAccessManager::abortRequest()

QgsMessageLog::logMessage( tr( "Network request %1 timed out" ).arg( reply->url().toString() ), tr( "Network" ) );

reply->abort();
if( reply->isRunning() )
reply->close();
}

QString QgsNetworkAccessManager::cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl )

0 comments on commit 7c4c7e8

Please sign in to comment.
You can’t perform that action at this time.