From d323bc71bce3dacdd1ca46754fd22d6510a5ab80 Mon Sep 17 00:00:00 2001 From: Mccree Lee Date: Sat, 3 Aug 2024 12:00:16 +0800 Subject: [PATCH] fix: crush when attach visual tree many times --- SukiUI/Controls/SukiTransitioningContentControl.axaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SukiUI/Controls/SukiTransitioningContentControl.axaml.cs b/SukiUI/Controls/SukiTransitioningContentControl.axaml.cs index a5f56ce6a..e0d10ba39 100644 --- a/SukiUI/Controls/SukiTransitioningContentControl.axaml.cs +++ b/SukiUI/Controls/SukiTransitioningContentControl.axaml.cs @@ -155,6 +155,9 @@ public void PushContent(object? content) _animCancellationToken.Cancel(); _animCancellationToken.Dispose(); _animCancellationToken = new CancellationTokenSource(); + + FirstBuffer = null; + SecondBuffer = null; if (_isFirstBufferActive) SecondBuffer = content; else FirstBuffer = content;