summaryrefslogtreecommitdiff
path: root/src/wx/content_menu.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-14 22:50:14 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-14 22:50:14 +0100
commit732ce79ef10c58c129a8b9822fad9955a97a153d (patch)
tree1fab563ca03ca2be09ea9cf8126a0ce1625b6e49 /src/wx/content_menu.cc
parente6725d6b0fc1a00fbcf35c1dda2c670f349f6a36 (diff)
Use wx_ptr for AutoCropDialog
Diffstat (limited to 'src/wx/content_menu.cc')
-rw-r--r--src/wx/content_menu.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc
index ac7a2b58b..83b84f594 100644
--- a/src/wx/content_menu.cc
+++ b/src/wx/content_menu.cc
@@ -545,11 +545,7 @@ ContentMenu::auto_crop ()
auto const crop = guess_crop_for_content ();
update_viewer (crop);
- if (_auto_crop_dialog) {
- _auto_crop_dialog->Destroy();
- _auto_crop_dialog = nullptr;
- }
- _auto_crop_dialog = new AutoCropDialog (_parent, crop);
+ _auto_crop_dialog.reset(_parent, crop);
_auto_crop_dialog->Show ();
/* Update the dialog and view when the crop threshold changes */