mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible crash in media viewer content re-show.
This commit is contained in:
@@ -2072,14 +2072,16 @@ void OverlayWidget::handleDocumentClick() {
|
||||
if (_document->loading()) {
|
||||
saveCancel();
|
||||
} else {
|
||||
_reShow = true;
|
||||
Data::ResolveDocument(
|
||||
findWindow(),
|
||||
_document,
|
||||
_message,
|
||||
_topicRootId);
|
||||
if (_document->loading() && !_radial.animating()) {
|
||||
if (_document && _document->loading() && !_radial.animating()) {
|
||||
_radial.start(_documentMedia->progress());
|
||||
}
|
||||
_reShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2852,7 +2854,7 @@ void OverlayWidget::show(OpenRequest request) {
|
||||
const auto contextItem = request.item();
|
||||
const auto contextPeer = request.peer();
|
||||
const auto contextTopicRootId = request.topicRootId();
|
||||
if (!request.continueStreaming() && !request.startTime()) {
|
||||
if (!request.continueStreaming() && !request.startTime() && !_reShow) {
|
||||
if (_message && (_message == contextItem)) {
|
||||
return close();
|
||||
} else if (_user && (_user == contextPeer)) {
|
||||
|
||||
@@ -539,6 +539,7 @@ private:
|
||||
QImage _staticContent;
|
||||
bool _staticContentTransparent = false;
|
||||
bool _blurred = true;
|
||||
bool _reShow = false;
|
||||
|
||||
ContentGeometry _oldGeometry;
|
||||
Ui::Animations::Simple _geometryAnimation;
|
||||
|
||||
Reference in New Issue
Block a user