Fix possible crash on bad data.
This commit is contained in:
parent
54fa16424d
commit
368468447f
|
@ -1194,7 +1194,9 @@ bool DocumentData::hasRemoteLocation() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DocumentData::useStreamingLoader() const {
|
bool DocumentData::useStreamingLoader() const {
|
||||||
if (const auto info = sticker()) {
|
if (size <= 0) {
|
||||||
|
return false;
|
||||||
|
} else if (const auto info = sticker()) {
|
||||||
return info->isWebm();
|
return info->isWebm();
|
||||||
}
|
}
|
||||||
return isAnimation()
|
return isAnimation()
|
||||||
|
|
Loading…
Reference in New Issue