summaryrefslogtreecommitdiffstats
path: root/qemu-tool.c
diff options
context:
space:
mode:
authorMichael Roth2012-01-21 02:08:27 +0100
committerAnthony Liguori2012-02-01 21:45:02 +0100
commitee77dfb26a5c7972bd7100e910c7427bcb1c8cae (patch)
tree78dcccfadca47b1adcfcbfea4d5608c8a1b5c123 /qemu-tool.c
parentoptionroms: Silence intermediate file removal (diff)
downloadqemu-ee77dfb26a5c7972bd7100e910c7427bcb1c8cae.tar.gz
qemu-ee77dfb26a5c7972bd7100e910c7427bcb1c8cae.tar.xz
qemu-ee77dfb26a5c7972bd7100e910c7427bcb1c8cae.zip
main-loop: Fix SetEvent() on uninitialized handle on win32
The __attribute__((constructor)) init_main_loop() automatically get called if qemu-tool.o is linked in. On win32, this leads to a qemu_notify_event() call which attempts to SetEvent() on a HANDLE that won't be initialized until qemu_init_main_loop() is manually called, breaking qemu-tools.o programs on Windows at runtime. This patch checks for an initialized event handle before attempting to set it, which is analoguous to how we deal with an unitialized io_thread_fd in the posix implementation. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-tool.c')
0 files changed, 0 insertions, 0 deletions