On 01/21/2012 02:08 AM, Michael Roth wrote:
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.

Signed-off-by: Michael Roth<mdr...@linux.vnet.ibm.com>

Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>

Paolo


Reply via email to