mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +00:00
GMLPlayground: Keep view_frame_action around to prevent a crash
The `view_frame_action` variable only exists for the duration of `initialize_menubar()`, so calling it in `m_preview_window->on_close` would crash. This fixes that by storing the action pointer inside MainWidget. (And storing the `view_window_action` too because it felt weird storing one and not the other.)
This commit is contained in:
parent
e938860126
commit
f3fe9b64bf
2 changed files with 11 additions and 8 deletions
|
@ -42,7 +42,10 @@ private:
|
|||
RefPtr<GUI::Window> m_preview_window;
|
||||
RefPtr<GUI::Widget> m_preview_window_widget;
|
||||
GUI::Widget* m_preview;
|
||||
|
||||
GUI::ActionGroup m_views_group;
|
||||
RefPtr<GUI::Action> m_view_frame_action;
|
||||
RefPtr<GUI::Action> m_view_window_action;
|
||||
|
||||
GUI::Icon m_icon;
|
||||
DeprecatedString m_file_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue