Fix errors with WAVs containing markers (#2617).
[dcpomatic.git] / src / wx / content_menu.cc
index ac7a2b58b44d13bf071e8d6055b8919b5d334f70..a92d505d237b597fc2c845120cfeacee42013eba 100644 (file)
@@ -27,7 +27,6 @@
 #include "repeat_dialog.h"
 #include "timeline_video_content_view.h"
 #include "timeline_audio_content_view.h"
-#include "wx_ptr.h"
 #include "wx_util.h"
 #include "lib/audio_content.h"
 #include "lib/config.h"
@@ -545,11 +544,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 */