mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
Run: Fix bug where it would crash because uninitialized main widget
The set_main_widget<T>() function only calls the construct and not `try_create()` that the GMLCompiler generates so all calls to `find_descendant_of_type_named()` would result in null pointers that would resolve in a crash.
This commit is contained in:
parent
747fd86f26
commit
582bf1eaf3
3 changed files with 12 additions and 3 deletions
|
@ -13,6 +13,8 @@
|
|||
#include <LibGUI/ItemListModel.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace Run {
|
||||
|
||||
class RunWindow final : public GUI::Window {
|
||||
C_OBJECT(RunWindow)
|
||||
public:
|
||||
|
@ -40,3 +42,5 @@ private:
|
|||
RefPtr<GUI::Button> m_browse_button;
|
||||
RefPtr<GUI::ComboBox> m_path_combo_box;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue