Signed-off-by: Marc-André Lureau <[email protected]>
---
hw/display/xlnx_dp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 2486d9e5825..98126ef320d 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -570,6 +570,12 @@ static void xlnx_dp_set_dpdma(const Object *obj, const
char *name, Object *val,
Error **errp)
{
XlnxDPState *s = XLNX_DP(obj);
+
+ if (!s) {
+ error_setg(errp, "%s cannot be set to NULL", name);
+ return;
+ }
+
if (s->console) {
DisplaySurface *surface = qemu_console_surface(s->console);
XlnxDPDMAState *dma = XLNX_DPDMA(val);
--
2.54.0