mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
spice: fix initialization order
Register displaychangelistener last, after spice is fully initialized,
otherwise we may hit NULL pointer dereferences when qemu starts calling
our callbacks.
Commit e250d949fe
triggers this bug.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
365b1e9e34
commit
bdd4df332a
2 changed files with 9 additions and 3 deletions
|
@ -573,7 +573,6 @@ void qemu_spice_display_init(DisplayState *ds)
|
|||
{
|
||||
assert(sdpy.ds == NULL);
|
||||
qemu_spice_display_init_common(&sdpy, ds);
|
||||
register_displaychangelistener(ds, &display_listener);
|
||||
|
||||
sdpy.qxl.base.sif = &dpy_interface.base;
|
||||
qemu_spice_add_interface(&sdpy.qxl.base);
|
||||
|
@ -581,4 +580,5 @@ void qemu_spice_display_init(DisplayState *ds)
|
|||
|
||||
qemu_spice_create_host_memslot(&sdpy);
|
||||
qemu_spice_create_host_primary(&sdpy);
|
||||
register_displaychangelistener(ds, &display_listener);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue