]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-char.c
Merge remote-tracking branch 'mst/tags/for_upstream' into staging
[mirror_qemu.git] / qemu-char.c
index 1e5a0e8cb96135a63cf8102e22e2e4b6147f3024..2c9940cea463b9593faf9f36a11492361a7d1176 100644 (file)
@@ -735,19 +735,23 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size)
         }
 }
 
+static bool muxes_realized;
+
 static void mux_chr_event(void *opaque, int event)
 {
     CharDriverState *chr = opaque;
     MuxDriver *d = chr->opaque;
     int i;
 
+    if (!muxes_realized) {
+        return;
+    }
+
     /* Send the event to all registered listeners */
     for (i = 0; i < d->mux_cnt; i++)
         mux_chr_send_event(d, i, event);
 }
 
-static bool muxes_realized;
-
 /**
  * Called after processing of default and command-line-specified
  * chardevs to deliver CHR_EVENT_OPENED events to any FEs attached