Fixed null reference exception on context menu buttons (#4586)

This commit is contained in:
Arjun Balgovind 2020-06-29 13:47:35 -07:00 committed by GitHub
parent f46b876fd6
commit 16e56c4edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ namespace Wox.ViewModel
}
// Result does not contain any context menu items - we don't need to show the context menu ListView at all.
if (ContextMenuItems.Count > 0)
if (ContextMenuItems != null && ContextMenuItems.Count > 0)
{
AreContextButtonsActive = IsSelected || IsHovered;
}