Fix crash in DocumentData destructor.

~DocumentData sometimes calls ~Image that calls RemoteSource::unload.
It tries to schedule delayed loaded deletion and accesses Auth().
But ~DocumentData is called from ~Session, so Auth() is unaccessible.
This commit is contained in:
John Preston 2018-10-29 17:49:01 +04:00
parent fd4dedcbdf
commit 8c1e546123

View File

@ -402,7 +402,7 @@ void RemoteSource::cancel() {
void RemoteSource::unload() {
if (loaderValid()) {
destroyLoaderDelayed();
delete base::take(_loader);
}
}