diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-25 15:09:23 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-25 15:09:23 +0200 |
commit | 1e1ada583fac67c05822c5caa3c0c04fce6cf9ce (patch) | |
tree | 127d8bb1a4224c4905e7bc6eaa4b1e13d9bbced2 /src | |
parent | 9c2b9929045a4121ce81b3e28a1a7ab742a3daa8 (diff) |
DocumentWidget: Crash after redirects
Diffstat (limited to 'src')
-rw-r--r-- | src/gmrequest.c | 10 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 53a3d031..7443c68c 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -615,10 +615,12 @@ iGmResponse *lockResponse_GmRequest(iGmRequest *d) { | |||
615 | } | 615 | } |
616 | 616 | ||
617 | void unlockResponse_GmRequest(iGmRequest *d) { | 617 | void unlockResponse_GmRequest(iGmRequest *d) { |
618 | iAssert(d->respLocked); | 618 | if (d) { |
619 | d->respLocked = iFalse; | 619 | iAssert(d->respLocked); |
620 | set_Atomic(&d->allowUpdate, iTrue); | 620 | d->respLocked = iFalse; |
621 | unlock_Mutex(d->mtx); | 621 | set_Atomic(&d->allowUpdate, iTrue); |
622 | unlock_Mutex(d->mtx); | ||
623 | } | ||
622 | } | 624 | } |
623 | 625 | ||
624 | iBool isFinished_GmRequest(const iGmRequest *d) { | 626 | iBool isFinished_GmRequest(const iGmRequest *d) { |
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index a843e840..ac07304d 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1081,6 +1081,7 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { | |||
1081 | /* Scheme changes must be manually approved. */ | 1081 | /* Scheme changes must be manually approved. */ |
1082 | showErrorPage_DocumentWidget_(d, schemeChangeRedirect_GmStatusCode, dstUrl); | 1082 | showErrorPage_DocumentWidget_(d, schemeChangeRedirect_GmStatusCode, dstUrl); |
1083 | } | 1083 | } |
1084 | unlockResponse_GmRequest(d->request); | ||
1084 | iReleasePtr(&d->request); | 1085 | iReleasePtr(&d->request); |
1085 | } | 1086 | } |
1086 | break; | 1087 | break; |