glutDestroyMenu()

when i try to destroy a menu i have created, i get a runtime error that says “The instruction at ‘0x1000c9e6’ referenced at ‘0x00000004’. The memory could not be read.” Why can’t i destroy the menu?