From 8376d8596196fe529881092cae2b4b75a468a24c Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 4 Sep 2020 12:57:46 -0400 Subject: [PATCH] Fix possible segfault when EventDelegate destroyed --- src/gui/Pages/Chat/Timeline/EventDelegate.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index 2c0e9858..6f29ef80 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -72,7 +72,8 @@ HColumnLayout { chat.userId, "get_event_profiles", [chat.roomId, model.id], - () => { fetchProfilesFuture = null } + // The if avoids segfault if eventDelegate is already destroyed + () => { if (eventDelegate) fetchProfilesFuture = null } ) Component.onDestruction: