Commit b76482e76560345c00e7d6c89199ced204a926d2

Authored by blueswir1
1 parent ef056e43

Fix buffer mux handling for unconnected serial ports


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3737 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 1 deletions
hw/slavio_serial.c
... ... @@ -475,7 +475,8 @@ static uint32_t slavio_serial_mem_readb(void *opaque, target_phys_addr_t addr)
475 475 else
476 476 ret = s->rx;
477 477 SER_DPRINTF("Read channel %c, ch %d\n", CHN_C(s), ret);
478   - qemu_chr_accept_input(s->chr);
  478 + if (s->chr)
  479 + qemu_chr_accept_input(s->chr);
479 480 return ret;
480 481 default:
481 482 break;
... ...