From 107f3b6616997b2c4035cf670305cee927e8aac8 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 6 May 2025 19:33:09 -0400 Subject: [PATCH] Make MessageDelegateBase::cleanupIncubator static This doesn't need to be attached to an instance of MessageDelegateBase, and avoid various problems when called from a MessageObjectIncubator callback. (Because it needs access to the "this" pointer.) Fixes a regularly occurring crash when switching rooms. --- src/timeline/messagedelegate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeline/messagedelegate.h b/src/timeline/messagedelegate.h index ba14bdd96..9345b3483 100644 --- a/src/timeline/messagedelegate.h +++ b/src/timeline/messagedelegate.h @@ -222,7 +222,7 @@ private: } cleanupIncubator(incubator); }; - void cleanupIncubator(MessageObjectIncubator *incubator); + static void cleanupIncubator(MessageObjectIncubator *incubator); void cleanupItem(QQuickItem *item); qreal m_spacing = 0.0;