Browse Source
Merge pull request #10117 from danielmayost/fixDisposeCompositionDrawingSurface
Fixes renderer throw InvalidOperationException
pull/10126/head
Nikita Tsukanov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.Base/Rendering/Composition/CompositionDrawingSurface.cs
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Avalonia.Rendering.Composition.Server; |
|
|
|
using Avalonia.Threading; |
|
|
|
|
|
|
|
namespace Avalonia.Rendering.Composition; |
|
|
|
|
|
|
|
@ -55,6 +56,6 @@ public class CompositionDrawingSurface : CompositionSurface |
|
|
|
|
|
|
|
~CompositionDrawingSurface() |
|
|
|
{ |
|
|
|
Dispose(); |
|
|
|
Dispatcher.UIThread.Post(Dispose); |
|
|
|
} |
|
|
|
} |
|
|
|
|