diff options
author | Brandon Scott <xeons@users.noreply.github.com> | 2019-10-01 20:49:10 -0500 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-03 08:17:41 +0200 |
commit | 17597f4681fb7d4e200a021092a351645003f394 (patch) | |
tree | 0955c56324ec22f635c9aced2bfabb5affb6fa1a /Libraries/LibGUI/GDirectoryModel.h | |
parent | 9da121f837df827b639b7c2e227d05556c4f6a68 (diff) | |
download | serenity-17597f4681fb7d4e200a021092a351645003f394.zip |
LibGUI: Fix GDirectoryModel lifetime bug.
Thumbnail generation callbacks were getting called after the class was already being destroyed causing a crash to occur.
Diffstat (limited to 'Libraries/LibGUI/GDirectoryModel.h')
-rw-r--r-- | Libraries/LibGUI/GDirectoryModel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GDirectoryModel.h b/Libraries/LibGUI/GDirectoryModel.h index 5f7ac03049..3a94e5ff2e 100644 --- a/Libraries/LibGUI/GDirectoryModel.h +++ b/Libraries/LibGUI/GDirectoryModel.h @@ -5,7 +5,8 @@ #include <LibGUI/GModel.h> #include <sys/stat.h> -class GDirectoryModel final : public GModel { +class GDirectoryModel final : public GModel + , public Weakable<GDirectoryModel> { public: static NonnullRefPtr<GDirectoryModel> create() { return adopt(*new GDirectoryModel); } virtual ~GDirectoryModel() override; |