Skip to content

Commit 151b420

Browse files
committedApr 5, 2016
don't crash when reply is destroyed while it's waiting for credentials to be entered
(cherry picked from commit 10a26e6)
1 parent d9be694 commit 151b420

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10875,8 +10875,9 @@ void QgisApp::namSetup()
1087510875
#endif
1087610876
}
1087710877

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

1088210883
QString username = auth->user();
@@ -10911,7 +10912,7 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
1091110912
if ( !ok )
1091210913
return;
1091310914

10914-
if ( reply->isFinished() )
10915+
if ( reply.isNull() || reply->isFinished() )
1091510916
return;
1091610917

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

0 commit comments

Comments
 (0)
Please sign in to comment.