aboutsummaryrefslogtreecommitdiff
path: root/hw/hyperv
diff options
context:
space:
mode:
Diffstat (limited to 'hw/hyperv')
-rw-r--r--hw/hyperv/hyperv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index a28e7249d8..8758635227 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -136,7 +136,11 @@ void hyperv_synic_add(CPUState *cs)
void hyperv_synic_reset(CPUState *cs)
{
- device_reset(DEVICE(get_synic(cs)));
+ SynICState *synic = get_synic(cs);
+
+ if (synic) {
+ device_reset(DEVICE(synic));
+ }
}
static const TypeInfo synic_type_info = {