fix #3552: NPE in menu handler