mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Fix a possible crash caused by a dangling pointer
This commit is contained in:
parent
ed26bcb3e7
commit
4a5ef8f173
@ -42,10 +42,9 @@ void OwncloudShibbolethCredsPage::setupBrowser()
|
||||
// we need to reset the cookie jar to drop temporary cookies (like the shib cookie)
|
||||
// i.e. if someone presses "back"
|
||||
QNetworkAccessManager *qnam = account->networkAccessManager();
|
||||
delete qnam->cookieJar();
|
||||
CookieJar *jar = new CookieJar;
|
||||
// Implicitly deletes the old cookie jar, and reparents the jar
|
||||
qnam->setCookieJar(jar);
|
||||
jar->setParent(0);
|
||||
|
||||
_browser = new ShibbolethWebView(account);
|
||||
connect(_browser, SIGNAL(shibbolethCookieReceived(const QNetworkCookie&, Account*)),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user