mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
Cleanup null reference fix with correct code practice (#4587)
* Fixed null reference exception on context menu buttons * Cleaned up fix with correct practices
This commit is contained in:
parent
16e56c4edb
commit
0dd17cc175
@ -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.
|
// Result does not contain any context menu items - we don't need to show the context menu ListView at all.
|
||||||
if (ContextMenuItems != null && ContextMenuItems.Count > 0)
|
if (ContextMenuItems?.Count > 0)
|
||||||
{
|
{
|
||||||
AreContextButtonsActive = IsSelected || IsHovered;
|
AreContextButtonsActive = IsSelected || IsHovered;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user