Skip to content
Permalink
Browse files

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

…s to be entered

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

void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *auth )
void QgisApp::namAuthenticationRequired( QNetworkReply *inReply, QAuthenticator *auth )
{
QPointer<QNetworkReply> reply( inReply );
Q_ASSERT( qApp->thread() == QThread::currentThread() );

QString username = auth->user();
@@ -10911,7 +10912,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 151b420

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