fix crashy edge case in OnMenuRenameFile