1
0
Эх сурвалжийг харах

Merge pull request #2034 from tdaffin/f10crash

Fix a crash when pressing F10 on a window that has no main menu
Jumar Macato 7 жил өмнө
parent
commit
154a320046

+ 5 - 2
src/Avalonia.Input/AccessKeyHandler.cs

@@ -234,8 +234,11 @@ namespace Avalonia.Input
 
                 case Key.F10:
                     _owner.ShowAccessKeys = _showingAccessKeys = true;
-                    MainMenu.Open();
-                    e.Handled = true;
+                    if (MainMenu != null)
+                    {
+                        MainMenu.Open();
+                        e.Handled = true;
+                    }
                     break;
             }
         }