diff options
author | Vinson Lee <vlee@vmware.com> | 2010-02-27 21:19:07 -0800 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-11 20:05:26 +0100 |
commit | a7e1baa3844ba61f818ad606d52044bef14aa1b6 (patch) | |
tree | 6fd0f32daf033ae265d9060aad3d72ffa37b08c5 | |
parent | 0b73ee99ad665c83417cfc8d108f5b8a2ae13c89 (diff) | |
download | glut-a7e1baa3844ba61f818ad606d52044bef14aa1b6.tar.gz |
glut: Add asserts to check for null pointer dereferences.
-rw-r--r-- | src/glut/glx/glut_event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c index d6d9638..4cdb814 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) { |