diff --git a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
index e51cc2f3ce..c5e1d43d80 100644
--- a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
+++ b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
@@ -79,8 +79,8 @@
-
-
+
+
@@ -102,4 +102,4 @@
-
\ No newline at end of file
+
diff --git a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
index 09fab0ed3f..55e30396e1 100644
--- a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
+++ b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
@@ -1,3 +1,4 @@
+using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Avalonia.Controls;
@@ -7,12 +8,18 @@ namespace Avalonia.Dialogs
{
public class AboutAvaloniaDialog : Window
{
+ private static readonly Version s_version = typeof(AboutAvaloniaDialog).Assembly.GetName().Version;
+
+ public static string Version { get; } = s_version.ToString(2);
+
+ public static bool IsDevelopmentBuild { get; } = s_version.Revision == 999;
+
public AboutAvaloniaDialog()
{
AvaloniaXamlLoader.Load(this);
DataContext = this;
}
-
+
public static void OpenBrowser(string url)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
diff --git a/src/Shared/PlatformSupport/StandardRuntimePlatform.cs b/src/Shared/PlatformSupport/StandardRuntimePlatform.cs
index d574732e3d..8521a50087 100644
--- a/src/Shared/PlatformSupport/StandardRuntimePlatform.cs
+++ b/src/Shared/PlatformSupport/StandardRuntimePlatform.cs
@@ -49,12 +49,20 @@ namespace Avalonia.Shared.PlatformSupport
public UnmanagedBlob(StandardRuntimePlatform plat, int size)
{
- if (size <= 0)
- throw new ArgumentException("Positive number required", nameof(size));
- _plat = plat;
- _address = plat.Alloc(size);
- GC.AddMemoryPressure(size);
- Size = size;
+ try
+ {
+ if (size <= 0)
+ throw new ArgumentException("Positive number required", nameof(size));
+ _plat = plat;
+ _address = plat.Alloc(size);
+ GC.AddMemoryPressure(size);
+ Size = size;
+ }
+ catch
+ {
+ GC.SuppressFinalize(this);
+ throw;
+ }
#if DEBUG
_backtrace = Environment.StackTrace;
lock (_btlock)