Fix possible segfault when EventDelegate destroyed

This commit is contained in:
miruka 2020-09-04 12:57:46 -04:00
parent 7b6478f514
commit 8376d85961

View File

@ -72,7 +72,8 @@ HColumnLayout {
chat.userId, chat.userId,
"get_event_profiles", "get_event_profiles",
[chat.roomId, model.id], [chat.roomId, model.id],
() => { fetchProfilesFuture = null } // The if avoids segfault if eventDelegate is already destroyed
() => { if (eventDelegate) fetchProfilesFuture = null }
) )
Component.onDestruction: Component.onDestruction: