summaryrefslogtreecommitdiff
path: root/hw/xwin/winblock.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-08 13:01:03 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-08 13:01:03 +0000
commit709a2343a8c12ea7e158c63a9737b11744b50994 (patch)
tree614bfc08773afaee25d3e4d2cc511ddbf7aa3413 /hw/xwin/winblock.c
parentd332a909f8b8741af75047d78a62a3d19e0776e1 (diff)
Fix a possible null-pointer dereference (Keishi Suenaga)
Diffstat (limited to 'hw/xwin/winblock.c')
-rw-r--r--hw/xwin/winblock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c
index 37da595a7..1d21faf46 100644
--- a/hw/xwin/winblock.c
+++ b/hw/xwin/winblock.c
@@ -54,8 +54,11 @@ winBlockHandler (int nScreen,
MSG msg;
#ifndef HAS_DEVWINDOWS
struct timeval **tvp = pTimeout;
- (*tvp)->tv_sec = 0;
- (*tvp)->tv_usec = 100;
+ if (*tvp != NULL)
+ {
+ (*tvp)->tv_sec = 0;
+ (*tvp)->tv_usec = 100;
+ }
#endif
#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)