ui/spice: Fix abort on macOS

The check is faulty because the thread variable was assigned in the main
thread while the main loop runs in a different thread on macOS.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3070
Signed-off-by: Mohamed Akram <[email protected]>
Acked-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>
(cherry picked from commit e7ecb533ee)
Signed-off-by: Michael Tokarev <[email protected]>
This commit is contained in:
Mohamed Akram authored and Michael Tokarev committed 2025-10-01 22:08:25 +03:00
1 parent 3a2ed64b6d
commit b4feb2ec85
1 file changed
+1 -5
+1 -5
View File
@@ -50,8 +50,6 @@ static int spice_migration_completed;
static int spice_display_is_running;
static int spice_have_target_host;
static QemuThread me;
struct SpiceTimer {
QEMUTimer *timer;
};
@@ -220,7 +218,7 @@ static void channel_event(int event, SpiceChannelEventInfo *info)
* thread and grab the BQL if so before calling qemu
* functions.
*/
bool need_lock = !qemu_thread_is_self(&me);
bool need_lock = !bql_locked();
if (need_lock) {
bql_lock();
}
@@ -667,8 +665,6 @@ static void qemu_spice_init(void)
spice_wan_compression_t wan_compr;
bool seamless_migration;
qemu_thread_get_self(&me);
if (!opts) {
return;
}