Browse Source
Merge pull request #4331 from SearchAThing-forks/fix-x11-xdestroywin-crash
fix X11 XDestroyWindow crash
pull/4333/head
Nikita Tsukanov
6 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
7 deletions
-
src/Avalonia.X11/X11Window.cs
|
|
|
@ -760,11 +760,7 @@ namespace Avalonia.X11 |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
if (_handle != IntPtr.Zero) |
|
|
|
{ |
|
|
|
XDestroyWindow(_x11.Display, _handle); |
|
|
|
Cleanup(); |
|
|
|
} |
|
|
|
Cleanup(); |
|
|
|
} |
|
|
|
|
|
|
|
void Cleanup() |
|
|
|
@ -787,8 +783,7 @@ namespace Avalonia.X11 |
|
|
|
} |
|
|
|
|
|
|
|
if (_useRenderWindow && _renderHandle != IntPtr.Zero) |
|
|
|
{ |
|
|
|
XDestroyWindow(_x11.Display, _renderHandle); |
|
|
|
{ |
|
|
|
_renderHandle = IntPtr.Zero; |
|
|
|
} |
|
|
|
} |
|
|
|
|