vl: Add failure check for SetEvent
authormalc <av1474@comtv.ru>
Sun, 27 Sep 2009 10:38:18 +0000 (14:38 +0400)
committermalc <av1474@comtv.ru>
Sun, 27 Sep 2009 10:41:14 +0000 (14:41 +0400)
Signed-off-by: malc <av1474@comtv.ru>
vl.c

diff --git a/vl.c b/vl.c
index fe23311..27c6458 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3390,7 +3390,11 @@ static int qemu_event_init(void)
 
 static void qemu_event_increment(void)
 {
-    SetEvent(qemu_event_handle);
+    if (!SetEvent(qemu_event_handle)) {
+        fprintf(stderr, "qemu_event_increment: SetEvent failed: %d\n",
+                GetLastError());
+        exit (1);
+    }
 }
 #endif