glut: Add asserts to check for null pointer dereferences.
This commit is contained in:
parent
706fffbff5
commit
edd6c338cf
|
@ -664,6 +664,7 @@ processEventsAndTimeouts(void)
|
||||||
case XK_KP_Delete: /* Introduced in X11R6. */
|
case XK_KP_Delete: /* Introduced in X11R6. */
|
||||||
/* The Delete character is really an ASCII key. */
|
/* The Delete character is really an ASCII key. */
|
||||||
__glutSetWindow(window);
|
__glutSetWindow(window);
|
||||||
|
assert(keyboard);
|
||||||
keyboard(127, /* ASCII Delete character. */
|
keyboard(127, /* ASCII Delete character. */
|
||||||
event.xkey.x, event.xkey.y);
|
event.xkey.x, event.xkey.y);
|
||||||
goto skip;
|
goto skip;
|
||||||
|
@ -1311,6 +1312,7 @@ processWindowWorkList(GLUTwindow * window)
|
||||||
}
|
}
|
||||||
/* Combine workMask with window->workMask to determine what
|
/* Combine workMask with window->workMask to determine what
|
||||||
finish and debug work there is. */
|
finish and debug work there is. */
|
||||||
|
assert(window);
|
||||||
workMask |= window->workMask;
|
workMask |= window->workMask;
|
||||||
|
|
||||||
if (workMask & GLUT_FINISH_WORK) {
|
if (workMask & GLUT_FINISH_WORK) {
|
||||||
|
|
Loading…
Reference in New Issue