summary refs log tree commit diff
path: root/src/timeline/widgets/ImageItem.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-20 22:08:16 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-20 22:08:16 +0200
commit020f153f1fed09c1cbeb5393098198c3f4bd49df (patch)
treee24626b29f0052d9b0336d325b381dcc02cdc7b7 /src/timeline/widgets/ImageItem.cc
parentBe explicit about the captured parameters in lambdas (diff)
downloadnheko-020f153f1fed09c1cbeb5393098198c3f4bd49df.tar.xz
Fix crash when trying to use automatically deleted ImageOverlay dialog
Diffstat (limited to '')
-rw-r--r--src/timeline/widgets/ImageItem.cc5
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();
         }
 }