Fix for potential crash introduced in 1b013c3

Fixes #1245
This commit is contained in:
ge0rdi
2022-12-14 15:53:54 +01:00
parent ac80080f90
commit b0c1d9a229

View File

@@ -2812,7 +2812,7 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
info.fMask|=CMIC_MASK_NOASYNC; // wait for delete/link commands to finish so we can refresh the menu
// we don't want our virtual folder to appear in Explorer's frequent list
if (wcsncmp(item.pItemInfo->PATH, L"::{82E749ED-B971-4550-BAF7-06AA2BF7E836}", 40) == 0)
if (item.pItemInfo && wcsncmp(item.pItemInfo->PATH, L"::{82E749ED-B971-4550-BAF7-06AA2BF7E836}", 40) == 0)
info.fMask &= ~CMIC_MASK_FLAG_LOG_USAGE;
s_bPreventClosing=true;