diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-12-22 12:58:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-23 23:27:45 +0100 |
commit | b67762a7f3d2d63f71de3a2d82fb627581b8b3da (patch) | |
tree | 4662c2fe441d11f0c881d3969d860e7ae68c2c50 /Userland/DevTools/HackStudio | |
parent | 98fa3736ed016288db60be93e4671167bb852f35 (diff) | |
download | serenity-b67762a7f3d2d63f71de3a2d82fb627581b8b3da.zip |
HackStudio: Make a new ProjectBuilder object when opening a project
We couldn't compile a project after creating it, because the project
builder was still holding a reference to the previous freed project.
Fixes: #15715
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 9177f3e4e3..132f41231a 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -185,7 +185,6 @@ ErrorOr<NonnullRefPtr<HackStudioWidget>> HackStudioWidget::create(DeprecatedStri }; } - widget->m_project_builder = make<ProjectBuilder>(*widget->m_terminal_wrapper, *widget->m_project); widget->project().model().set_should_show_dotfiles(Config::read_bool("HackStudio"sv, "Global"sv, "ShowDotfiles"sv, false)); return widget; @@ -252,6 +251,7 @@ void HackStudioWidget::open_project(DeprecatedString const& root_path) } m_project = Project::open_with_root_path(root_path); VERIFY(m_project); + m_project_builder = make<ProjectBuilder>(*m_terminal_wrapper, *m_project); if (m_project_tree_view) { m_project_tree_view->set_model(m_project->model()); m_project_tree_view->update(); |