Propogated a pointer-check from menu-attach to menu-detach. (Apparently,
authorRichard Rauch <rkr@olib.org>
Mon, 27 Oct 2003 06:39:57 +0000 (06:39 +0000)
committerRichard Rauch <rkr@olib.org>
Mon, 27 Oct 2003 06:39:57 +0000 (06:39 +0000)
commitc0b24ae9f197885c2bfde8ca2fc4883858b7fc33
tree3d08c2e0461d236a61d5c3548d877ccef14fe230
parent66020d178567b14498d01f54f9ba9a8eeaca69c6
Propogated a pointer-check from menu-attach to menu-detach.  (Apparently,
in some cases, the Menu member variable can be NULL.)

Corrected the menu-attach code to make sure that both Window and Menu
pointers are non-NULL (rather than "at least one").

Rewrote button-checks to more simply and more clearly assert that the
"menu button" is a valid button for menu actions: Instead of laboriously
comparing against the three valid buttons (0, 1, 2 or GLUT_BUTTON_*),
we do a simpler range-check and the upper bound is {FREEGLUT_MAX_MENUS},
allowing us to change the number of menuable buttons fairly easily in
the future.

Also deleted a few say-nothing-new comments.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@250 7f0cb862-5218-0410-a997-914c9d46530a
src/freeglut_menu.c