mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Fix crash when trying to use automatically deleted ImageOverlay dialog
This commit is contained in:
parent
f95998a64b
commit
020f153f1f
2 changed files with 2 additions and 4 deletions
|
@ -79,5 +79,4 @@ private:
|
|||
mtx::events::RoomEvent<mtx::events::msg::Image> event_;
|
||||
|
||||
QSharedPointer<MatrixClient> client_;
|
||||
QSharedPointer<dialogs::ImageOverlay> image_dialog_;
|
||||
};
|
||||
|
|
|
@ -150,9 +150,8 @@ ImageItem::mousePressEvent(QMouseEvent *event)
|
|||
if (textRegion_.contains(event->pos())) {
|
||||
openUrl();
|
||||
} else {
|
||||
image_dialog_ =
|
||||
QSharedPointer<dialogs::ImageOverlay>(new dialogs::ImageOverlay(image_, this));
|
||||
image_dialog_->show();
|
||||
auto imgDialog = new dialogs::ImageOverlay(image_);
|
||||
imgDialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue