Skip to content
Permalink
Browse files

don't crash when reply is destroyed while it's waiting for credentials

to be entered

(backports 10a26e6)
  • Loading branch information
jef-n committed Apr 5, 2016
1 parent b3f8a85 commit ae162d60f0f2344071517fa5dc5e02094d8a71d2
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgisapp.cpp
@@ -10238,8 +10238,9 @@ void QgisApp::namSetup()
#endif
}

void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *auth )
void QgisApp::namAuthenticationRequired( QNetworkReply *inReply, QAuthenticator *auth )
{
QPointer<QNetworkReply> reply( inReply );
QString username = auth->user();
QString password = auth->password();

@@ -10270,7 +10271,7 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
if ( !ok )
return;

if ( reply->isFinished() )
if ( reply.isNull() || reply->isFinished() )
return;

if ( auth->user() != username || ( password != auth->password() && !password.isNull() ) )

0 comments on commit ae162d6

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