hw/xlnx_dp: reject NULL 'dpdma' property rather than crash
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau committed
May 3, 2026 at 11:53 UTC
6f737662e9694e88d1f91c014640c839d12b4a25
1 file changed
+6
hw/display/xlnx_dp.c
+6
@@ -570,6 +570,12 @@ static void xlnx_dp_set_dpdma(const Object *obj, const char *name, Object *val,
570
Error **errp)
571
{
572
XlnxDPState *s = XLNX_DP(obj);
573
+
574
+ if (!s) {
575
+ error_setg(errp, "%s cannot be set to NULL", name);
576
+ return;
577
+ }
578
+
579
if (s->console) {
580
DisplaySurface *surface = qemu_console_surface(s->console);
581
XlnxDPDMAState *dma = XLNX_DPDMA(val);