diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-02-25 01:53:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-02-25 01:54:22 +0100 |
| commit | 9f150f04c8fce17dbcbe11278dd78c6e35809aa2 (patch) | |
| tree | dc4c36254282b9152b9ff04dc09f07dc1e6ba0f1 /src/wx/text_panel.cc | |
| parent | 674b74173d2d0ec8e178fa0938a4c48c2863c38b (diff) | |
Fix misunderstanding of wxDialog lifetime handling.2978-wxptr-crash
Broken by d0308d53dd9f4d036d8c5fe8023920fcdfd43f39
wxDialog can be stack allocated if opened with ShowModal(), but not with
Show(). Go back to wx_ptr for those that are opened with Show().
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index ddb5bf56d..f2055a542 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -689,7 +689,7 @@ TextPanel::text_view_clicked () auto decoder = decoder_factory (_parent->film(), c.front(), false, false, shared_ptr<Decoder>()); if (decoder) { - _text_view.emplace(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); + _text_view.reset(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); _text_view->show(); } } @@ -701,8 +701,8 @@ TextPanel::fonts_dialog_clicked () auto c = _parent->selected_text (); DCPOMATIC_ASSERT (c.size() == 1); - _fonts_dialog.emplace(this, c.front(), c.front()->text_of_original_type(_original_type)); - _fonts_dialog->Show(); + _fonts_dialog.reset(this, c.front(), c.front()->text_of_original_type(_original_type)); + _fonts_dialog->Show (); } |
