diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-20 22:08:16 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-20 22:08:16 +0200 |
commit | 020f153f1fed09c1cbeb5393098198c3f4bd49df (patch) | |
tree | e24626b29f0052d9b0336d325b381dcc02cdc7b7 /src/timeline/widgets/ImageItem.cc | |
parent | Be explicit about the captured parameters in lambdas (diff) | |
download | nheko-020f153f1fed09c1cbeb5393098198c3f4bd49df.tar.xz |
Fix crash when trying to use automatically deleted ImageOverlay dialog
Diffstat (limited to '')
-rw-r--r-- | src/timeline/widgets/ImageItem.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/timeline/widgets/ImageItem.cc b/src/timeline/widgets/ImageItem.cc index 08a057da..83ab96b1 100644 --- a/src/timeline/widgets/ImageItem.cc +++ b/src/timeline/widgets/ImageItem.cc @@ -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(); } } |