diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-07-24 11:22:15 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-07-24 17:02:02 +0100 |
commit | 67fa1f5700248fc66d5b1526c268737e29892b86 (patch) | |
tree | c9904a5ce91de29b733afa6fd918b41b14922e83 /hw | |
parent | 57225e5f32bb051c9eb03758647963aeb72cebbf (diff) | |
download | qemu-67fa1f5700248fc66d5b1526c268737e29892b86.zip qemu-67fa1f5700248fc66d5b1526c268737e29892b86.tar.gz qemu-67fa1f5700248fc66d5b1526c268737e29892b86.tar.bz2 |
audio/hda: Fix migration
Fix outgoing migration which was crashing in
vmstate_hda_audio_stream_buf_needed, I think the problem
is that we have room for upto 4 streams in the array but only
use 2, when we come to try and save the state of the unused
streams we hit st->state == NULL.
Fixes: 280c1e1cdb24d80ecdfc
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180724102215.31866-1-dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/audio/hda-codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 2b58c35..617a1c1 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -786,7 +786,7 @@ static void hda_audio_reset(DeviceState *dev) static bool vmstate_hda_audio_stream_buf_needed(void *opaque) { HDAAudioStream *st = opaque; - return st->state->use_timer; + return st->state && st->state->use_timer; } static const VMStateDescription vmstate_hda_audio_stream_buf = { |