diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-02 09:37:27 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-05 11:54:49 +0100 |
commit | bdd4df332a1bdb20b7fa39ea741f7830e41e1187 (patch) | |
tree | 3f66ef947c8d3acc2fa7783c8d05245c2a9889c5 /ui/spice-display.c | |
parent | 365b1e9e3486aaa55f30df6f16ecafffaef6ec98 (diff) | |
download | hqemu-bdd4df332a1bdb20b7fa39ea741f7830e41e1187.zip hqemu-bdd4df332a1bdb20b7fa39ea741f7830e41e1187.tar.gz |
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 e250d949feb1334828f27f0d145c35f29c4b7639 triggers this bug.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r-- | ui/spice-display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c index fe2fdfb..0cc0116 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -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); } |