2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-08 10:26:37 +00:00

Possibly fix a crash in image loader.

This commit is contained in:
John Preston
2018-12-05 15:50:41 +04:00
parent 310c68a744
commit f59e824ec1
2 changed files with 9 additions and 2 deletions

View File

@@ -325,6 +325,8 @@ void RemoteSource::loadLocal() {
void RemoteSource::setImageBytes(const QByteArray &bytes) {
if (bytes.isEmpty()) {
return;
} else if (loaderValid()) {
unload();
}
_loader = createLoader({}, LoadFromLocalOnly, true);
_loader->finishWithBytes(bytes);