mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-03 21:07:53 +00:00
Fix crash in media caching.
This commit is contained in:
parent
18c42954ae
commit
2ce4abfdfe
@ -365,6 +365,7 @@ void Reader::Slices::processCacheResult(
|
||||
}
|
||||
// So just process whole result even if we didn't want header really.
|
||||
slice.flags |= Slice::Flag::LoadingFromCache;
|
||||
slice.flags &= ~Slice::Flag::LoadedFromCache;
|
||||
}
|
||||
if (!(slice.flags & Slice::Flag::LoadingFromCache)) {
|
||||
// We could've already unloaded this slice using LRU _usedSlices.
|
||||
|
@ -77,9 +77,9 @@ private:
|
||||
|
||||
struct Slice {
|
||||
enum class Flag : uchar {
|
||||
LoadingFromCache = 0x02,
|
||||
LoadedFromCache = 0x04,
|
||||
ChangedSinceCache = 0x08,
|
||||
LoadingFromCache = 0x01,
|
||||
LoadedFromCache = 0x02,
|
||||
ChangedSinceCache = 0x04,
|
||||
};
|
||||
friend constexpr inline bool is_flag_type(Flag) { return true; }
|
||||
using Flags = base::flags<Flag>;
|
||||
|
Loading…
Reference in New Issue
Block a user