Browse Source
Merge pull request #2034 from tdaffin/f10crash
Fix a crash when pressing F10 on a window that has no main menu
pull/2039/head
Jumar Macato
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
2 deletions
-
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; |
|
|
|
} |
|
|
|
} |
|
|
|
|