Skip to content

Commit 10a26e6

Browse files
committedApr 5, 2016
don't crash when reply is destroyed while it's waiting for credentials to be entered
1 parent acb9281 commit 10a26e6

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
@@ -10907,8 +10907,9 @@ void QgisApp::namSetup()
1090710907
#endif
1090810908
}
1090910909

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

1091410915
QString username = auth->user();
@@ -10943,7 +10944,7 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
1094310944
if ( !ok )
1094410945
return;
1094510946

10946-
if ( reply->isFinished() )
10947+
if ( reply.isNull() || reply->isFinished() )
1094710948
return;
1094810949

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

0 commit comments

Comments
 (0)
Please sign in to comment.