Fix crash in round video playback.

This commit is contained in:
John Preston 2018-11-05 14:00:53 +04:00
parent 53a719e1b1
commit b420f5b41b
2 changed files with 6 additions and 2 deletions

View File

@ -70,7 +70,9 @@ RoundController::RoundController(
Auth().data().itemRepaintRequest(
) | rpl::start_with_next([=](not_null<const HistoryItem*> item) {
if (item == _context) {
checkReaderState();
crl::on_main(this, [=] {
checkReaderState();
});
}
}, lifetime());
}

View File

@ -26,7 +26,9 @@ namespace Player {
struct TrackState;
enum class State;
class RoundController : private base::Subscriber {
class RoundController
: public base::has_weak_ptr
, private base::Subscriber {
struct CreateTag;
public: