mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-05 03:14:28 +00:00
04dbbab4a1
SendFilesBox::Block (aka Block) passes action callbacks to AlbumPreview / SingleMediaPreview. These callbacks access Block::_items through a captured "this" pointer. With std::vector<Block>, _blocks.emplace_back() may reallocate and move existing Block objects. Callbacks already stored inside previews then keep a dangling Block*, and a later context-menu action can crash when reading this->_items. Switched _blocks to std::deque<Block> so existing element addresses stay stable on std::deque::push_back, keeping callback captures valid for previews.