Fix crash in media preview.

This commit is contained in:
John Preston 2018-12-11 16:22:27 +04:00
parent cf227490d7
commit 3ad29f6eb7
1 changed files with 3 additions and 0 deletions

View File

@ -81,6 +81,9 @@ MainWindow::MainWindow() {
subscribe(Messenger::Instance().authSessionChanged(), [this] {
updateGlobalMenu();
if (!AuthSession::Exists()) {
_mediaPreview.destroy();
}
});
subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &data) {
themeUpdated(data);