From e38b454e110d85c893e6cdc71fd71467562ec9c1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 29 Sep 2019 20:37:02 +0200 Subject: [PATCH] LibGUI: Fix crash in GAboutDialog::show() It needed some updating to the new ref-counted CObject ways. --- Libraries/LibGUI/GAboutDialog.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Libraries/LibGUI/GAboutDialog.h b/Libraries/LibGUI/GAboutDialog.h index b4fdfe54dd..8c88a650ab 100644 --- a/Libraries/LibGUI/GAboutDialog.h +++ b/Libraries/LibGUI/GAboutDialog.h @@ -5,16 +5,17 @@ class GAboutDialog final : public GDialog { C_OBJECT(GAboutDialog) public: - GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr); virtual ~GAboutDialog() override; static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr) { - GAboutDialog dialog(name, icon, parent); - dialog.exec(); + auto dialog = GAboutDialog::construct(name, icon, parent); + dialog->exec(); } private: + GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr); + String m_name; RefPtr m_icon; };