1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

HackStudio: Don't crash when invalid file is requested to be opened

Previously, if the running debugger asked for HackStudio to open
an invalid file, it would crash trying to switch to it. Now it will
just continue without switching the editor.
This commit is contained in:
FalseHonesty 2021-04-15 12:42:40 -04:00 committed by Andreas Kling
parent 7a1396f509
commit e0be8a3f59
Notes: sideshowbarker 2024-07-18 19:26:40 +09:00
2 changed files with 11 additions and 8 deletions

View file

@ -53,7 +53,7 @@ class HackStudioWidget : public GUI::Widget {
public:
virtual ~HackStudioWidget() override;
void open_file(const String& filename);
bool open_file(const String& filename);
void update_actions();
Project& project();
@ -106,7 +106,7 @@ private:
NonnullRefPtr<GUI::Action> create_set_autocomplete_mode_action();
void add_new_editor(GUI::Widget& parent);
NonnullRefPtr<EditorWrapper> get_editor_of_file(const String& file_name);
RefPtr<EditorWrapper> get_editor_of_file(const String& file_name);
String get_project_executable_path() const;
void on_action_tab_change();