aboutsummaryrefslogtreecommitdiffstats
path: root/src/glut
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-02-27 21:19:07 -0800
committerVinson Lee <[email protected]>2010-02-27 21:19:47 -0800
commitedd6c338cfa69b6bf9cac0922ebb9518fbca7eed (patch)
tree0d79c4d22340758879cf0595d4fd15cdc635b814 /src/glut
parent706fffbff59be0dc884e1938f1bdf731af1efa3e (diff)
glut: Add asserts to check for null pointer dereferences.
Diffstat (limited to 'src/glut')
-rw-r--r--src/glut/glx/glut_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c
index d6d963896a6..4cdb814d76a 100644
--- a/src/glut/glx/glut_event.c
+++ b/src/glut/glx/glut_event.c
@@ -664,6 +664,7 @@ processEventsAndTimeouts(void)
case XK_KP_Delete: /* Introduced in X11R6. */
/* The Delete character is really an ASCII key. */
__glutSetWindow(window);
+ assert(keyboard);
keyboard(127, /* ASCII Delete character. */
event.xkey.x, event.xkey.y);
goto skip;
@@ -1311,6 +1312,7 @@ processWindowWorkList(GLUTwindow * window)
}
/* Combine workMask with window->workMask to determine what
finish and debug work there is. */
+ assert(window);
workMask |= window->workMask;
if (workMask & GLUT_FINISH_WORK) {