Browse Source

fix null check when there is no exporter.

pull/2978/head
Dan Walmsley 7 years ago
parent
commit
160deba772
  1. 2
      src/Avalonia.Controls/NativeMenu.Export.cs

2
src/Avalonia.Controls/NativeMenu.Export.cs

@ -40,7 +40,7 @@ namespace Avalonia.Controls
if (rv == null)
{
target.SetValue(s_nativeMenuInfoProperty, rv = new NativeMenuInfo(target));
SetIsNativeMenuExported(target, rv.Exporter.IsNativeMenuExported);
SetIsNativeMenuExported(target, rv.Exporter?.IsNativeMenuExported ?? false);
}
return rv;

Loading…
Cancel
Save