diff mbox series

[v12,09/10] ui/cocoa: Call console_select() with the BQL

Message ID 20240224-cocoa-v12-9-e89f70bdda71@daynix.com
State New
Headers show
Series ui/cocoa: Use NSWindow's ability to resize | expand

Commit Message

Akihiko Odaki Feb. 24, 2024, 12:43 p.m. UTC
[-QemuCocoaView displayConsole:] can be called anytime so explicitly
take the BQL before it calls console_select().

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index cebfae04d9e8..33d31b82bcab 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1360,7 +1360,9 @@  - (void)zoomToFit:(id) sender
 /* Displays the console on the screen */
 - (void)displayConsole:(id)sender
 {
-    console_select([sender tag]);
+    with_bql(^{
+        console_select([sender tag]);
+    });
 }
 
 /* Pause the guest */