fix: potential crash calling tray.popUpContextMenu()
#39231
Merged
tray.popUpContextMenu()
#39231