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.h | |
| 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.h')
| -rw-r--r-- | src/wx/text_panel.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wx/text_panel.h b/src/wx/text_panel.h index e89b9a54d..3c6e183dc 100644 --- a/src/wx/text_panel.h +++ b/src/wx/text_panel.h @@ -19,19 +19,19 @@ */ -#include "content_sub_panel.h" -#include "fonts_dialog.h" -#include "text_view.h" #include "lib/job.h" +#include "content_sub_panel.h" +#include "wx_ptr.h" class CheckBox; class Choice; +class wxSpinCtrl; class LanguageTagWidget; +class TextView; +class FontsDialog; class SpinCtrl; class SubtitleAnalysis; -class TextView; -class wxSpinCtrl; class TextPanel : public ContentSubPanel @@ -100,9 +100,9 @@ private: wxStaticText* _stream_label; wxChoice* _stream; wxButton* _text_view_button; - boost::optional<TextView> _text_view; + wx_ptr<TextView> _text_view; wxButton* _fonts_dialog_button; - boost::optional<FontsDialog> _fonts_dialog; + wx_ptr<FontsDialog> _fonts_dialog; wxButton* _appearance_dialog_button; TextType _original_type; wxStaticText* _language_label = nullptr; |
